Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beware getElementsByName() in IE

Status
Not open for further replies.

genis

Programmer
Aug 15, 2002
6
US
In IE using getElementsByName() is a problem.

IE always returns the name that is hardcoded into the page.

Even if a javascript function has changed "myName" to "yoName" IE will return "myName"... because that's what it sees is hardcoded into the page.

So if you want to find a name that has already been changed and you try looking for it with getElementsByName() nothing will be returned.

Boooo IE... Boooo once more.
Use Mozilla.
 
yes, boo IE! Let's create a chromeless window in Mozilla - oh, wait: you can't. Let's create a textRange object in Mozilla - oh wait, you can't. Let's create a modalDialog in Mozilla - oh wait, you can't. =========================================================
if (!succeed) try();
-jeff
 
Yes, and boo people like you who seem to think if IE has it, it should be a standard. Quite simply all you named were either add-ons only IE specific or a part of their JScript engine.

Having nothing to do with standards.

Sorry, jeff, IE developers should really stick to finishing compliance with standards before coming up with sticking their own nifty crap in there.

getElementsByName() is one such part of the ECMAscript specification they needed to comply with.

But hey.. thanks for flaming! Hope you enjoy your parting gifts. Buh-bye.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top