[web] problm with onclick in javascript
Hey, i need to use the onlick event for an option element that is used in a select element. The onclick need to perform some stuff, and it works fine in Netscape, but it doesnt work in Internet Explorer. Does Internet Explorer not support using the onclick event in option elements? If this is the case, does the option element support any events in IE? The code works fine in Netscape, any help would be much appreciated. The site is http://foresthome.outfitters.org/catalog/
The page in question is viewable when you are checking out and entering shipping information...
I know this is not directly game related, but I dunno any other websites to post on :(
But it can be game related if you want something to happen when a user clicks an option in a menu...
Option elements aren't really "real" visible elements, rather they just choose what options a select displays.
Normally if I wanted to trigger something from a select box being changed, I'd use the onchange event on the select object.
However, this is an absolutely horrible technique that I would strongly advise against under all but the most well-though-out situations.
- You can't see all the options at once
- As soon as you select one option, it "does something"
- Keyboard-only users can't use it at all, because there's no way of selecting an option below the first one without selecting a previous one first.
Mark
Normally if I wanted to trigger something from a select box being changed, I'd use the onchange event on the select object.
However, this is an absolutely horrible technique that I would strongly advise against under all but the most well-though-out situations.
- You can't see all the options at once
- As soon as you select one option, it "does something"
- Keyboard-only users can't use it at all, because there's no way of selecting an option below the first one without selecting a previous one first.
Mark
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement