If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

MSIE Doesn't support getelementbytag..any ideas?

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

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

...makes me suspect you might be trying to assign the same id to multiple elements? This is illegal in HTML (every id must be unique - if other browsers are allowing this, then -WWNC- IE is the one that got it right). You should use a classname or data- attribute instead.

You might also consider making a reduced test case using an online tool like jsfiddle to help us understand your problem further.

You are correct it is the "getElementsByTagName" and you are further correct that I may be confusing the id's so I did attempt applying multiple id's to the div's as it is legal an has worked in the past. The below is working out great! However the for loop isn't keeping the others hidden as I click through the buttons. The id's correctly allow the appearance of the div however the previously invoke div doesn't disappear and they simply stack atop each other?...any ideas?

the below is what I have and the divs appear, however, they yet to disappear while at the bottom of the routine there is an if statement commented out which retains an element for index increment that will change the to hidden. Any ideas?

Okay! after having walked away from the project for a night I reviewed the code an completed a simplistic fix to the above "Messy Code" and have included it below for readers that may become confused as I did!...Your assistance is very valued and appreciated, much thanks :-)
Ted