I’ve been running into some trouble with a script that just isn’t working, and since I’m not encountering any error messages and a similar script on the same page is working just fine, I’m really puzzled.
Anyways, here’s the code I’m having trouble with:
[code]
function ShowHide(Numb){
Ident1 = AdIDList[Numb]+”Tx”;
Ident2 = AdIDList[Numb]+”Lnk”;
if (AdLink[Numb] == “hidden”){
document.getElementById(Ident1).style.height = “355px”;
AdLink[Numb] = “visible”;
}
if (AdLink[Numb] ==”visible”){
document.getElementById(Ident1).style.height = “55px”;
AdLink[Numb] = “hidden”;
}
}
And here’s the page code calling it (The page is assembled via PHP from a database, but I’m grabbing the code from my browser)
[code] <a href=”#Good ShepherdLnk” id=”Good ShepherdLnk” onclick=”ShowHide(2);return false;” class=”AdLink”>Stories</a><br>
And, here’s a similar bit of code on the same page that is working just as it’s supposed to.
[code] function hideimage(){
for (Count=0; Count<AdTotal; Count ++){
if (VisPic[Count]==”visible”){
Ident = AdIDList[Count]+”AdB”;
document.getElementById(Ident).style.visibility = “hidden”;
VisPic[Count]=”hidden”;
}
}
}
function bigimage(Item){
hideimage();
Ident1 = AdIDList[Item]+”AdB”;
document.getElementById(Ident1).style.left=”35%”;
document.getElementById(Ident1).style.visibility = “visible”;
VisPic[Item] = “visible”;
}