Greetings, September 4th 2013
I am presently attempting to alter multiple div styles from hidden to visible as I select a button that loads a specific id to a function and the button id serves as id for the div as well and all the div's appear as they should in "Fire Fox", "Safari" However, I've learned that MSIE doesn't support the getelementByTag and other routines reference the div ids so changing accordingly is out as an option. I've attempted document.all, however, the result hasn't worked as a variable in the id of getelementbyid rather it reports as null !...Any ideas? Again, the id's of the div's are the identical to the id's of the css buttons All goes well however "tag.style.visibility" isn't recognized and null..I've included some messy code below
Appreciatively,
Ted
Code:var tag, tags; //alert(document.all.length); for(i = 0; i < document.all.length; i++) { tag = document.all(i).getAttribute('id'); tag2 = document.all(i).getAttribute('name'); //alert(tag+" <==IE==> "+tag2+" ==choosen one===>"+thechosenone.id); if(tag==thechosenone.id && tag2=='contentarea'){ alert(tag+"<< == >>"+thechosenone.id); //tag.style.visibility = 'visible'; //tag2.style.visibility = 'hidden'; document.getElementById('contentarea1').style.visibility = 'visible'; //alert(tag(i).style.visibility); if (tag==thechosenone.id) { alert('in here'); if (tag.style.visibility == 'hidden') { tag.style.visibility = 'visible'; } else { tag.style.visibility = 'hidden'; } }else { //if(tag2=='contentarea'){ tag.style.visibility = 'hidden'; // } } //alert(tag+" <==IE==> "+tag2); //alert('match'); //tags = tags + "\r" + tag; } }



Reply With Quote


Bookmarks