HTML Select, OnChange on <option>?

@

@sh

Hi guys,

As far as I understand it, there is no possible way to add an
OnSelect/Onchange to an actual <option> within a select tag (to perhaps jump
to a page or run a DOM command), is this still correct with modern client
browser advances (obviously taking into account the incompatibilities of
this method with older browsers).

Cheers, Ash
 
D

Dietmar Meier

@sh said:
As far as I understand it, there is no possible way to add an
OnSelect/Onchange to an actual <option> within a select tag

Use the select element's onchange handler and it's selectedIndex
property instead.

ciao, dhgm
 
@

@sh

Dietmar Meier said:
Use the select element's onchange handler and it's selectedIndex
property instead.

ciao, dhgm

Ahhhh ok cool, shame its not a little simpler though and accessible directly
from the <option> tag.

Cheers, Ash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top