Jump to content
  • Advertisement
Sign in to follow this  
kylecrass

[web] problm with onclick in javascript

This topic is 4523 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!