Hello, i have a span im trying to display using javascript from a .net page, i have the click working to expand each item individually, but im trying to have an "Expand All" button. i get err style is null or not an object.
ive tried document.getElementByID(dlProducts...), but errs with Object doesnt support this.
any input would be super!
heres the one that works individually
ive tried document.getElementByID(dlProducts...), but errs with Object doesnt support this.
any input would be super!
Code:
for (var a=2; a < 5; a++) {
dSpan = "dlProducts__ctl"+a+"_detailSpan";
dSpan.style.display = 'block';
dSpan.style.visibility = 'visible';
}
heres the one that works individually
Code:
tr2.Attributes.Add("onclick", "showContact(" + sp1.ClientID + "," + img1.ClientID + ");");
function showContact(clicked,image)
{
var elem = clicked;
if (elem)
{
if (elem.style.display != 'block')
{
elem.style.display = 'block';
elem.style.visibility = 'visible';
image.src = "img/action/plusout.gif";
}
else
{
elem.style.display = 'none';
elem.style.visibility = 'hidden';
image.src = "img/action/plusin.gif";
}
}
}