By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,648 Members | 1,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,648 IT Pros & Developers. It's quick & easy.

how to fire onchange event of a pull down menu

P: n/a
hi all
any body has any idea on how to fire onchange event of a pulldown menu
with script.
i need to trigger it so it when i select a certain option from
script,the event handler is executed

Sep 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ASM
Steve a écrit :
hi all
any body has any idea on how to fire onchange event of a pulldown menu
with script.
i need to trigger it so it when i select a certain option from
script,the event handler is executed
<select onchange="alert(this.text);" ... >

<select
onchange="
var k = this.options.selectedIndex;
if(k==3) alert(this.text);
" ... >

<select
onchange="
var k = this.options.selectedIndex;
if(this.options[k].value=='ok') alert('winner');
" ... >

and so on

--
ASM
Sep 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.