You are reading IE vs FireFox - js quirk. You can leave a comment or trackback this post.
Posted on September 7th, 2006 by arnljot.
Categories: html, javascript.
Just discovered that FireFox version 1.5.06 doesn’t like reserved words in javascript functions
I had a radio button (input type=”radio” name=”rooms” onClick=”toggle(this);”/) which called a method with the signature “function toggle(radio)”.
This worked fine in IE 6, but in FireFox this didn’t execute at all, not even giving error messages.
Changeing the call and method signature to “onClick=’onOffShare(this);’” and “function onOffShare(room)” did the trick, and it now works in both browsers.
Seems that the lesson is to avoid potentially reserved words like “toggle” and “radio” in FireFox.
0 comments.
Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.