| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Select Control onChange Event|
Difference betw. IE/Opera and Mozilla/Netscape?
Ok I am encountering a problem with my onChange event for a select control. In Mozilla and Netscape, 'this.value' gets sent properly to my function, but in IE and Opera 'this.value' is nothing.
Simplified version of code:
<select name="weeks" onChange="alert(this.value);">
Any idea why this problem is occuring and what I can do to remedy it?
On the face of it, it looks like it should work.
If you change the onChange event handler to
and explictly state the options value,
Then it works.
Thanks that works.
Curious as to why my original method would work properly in Mozilla but not IE.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved