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

FAQ abt. JavaScript

P: 4
how can i pass the <select>,<option> value to Function within Java Script
Feb 17 '07 #1
Share this Question
Share on Google+
2 Replies

10K+
P: 13,262
how can i pass the <select>,<option> value to Function within Java Script
Depends on where you are calling the function from. If you call the function on submit of the from you may do something like

[HTML]document.forms['formName'].selectName.options[document.forms['formName'].selectName.selectedIndex].value[/HTML]

to retrive the selected value
Feb 17 '07 #2

acoder
Expert Mod 15k+
P: 16,027
how can i pass the <select>,<option> value to Function within Java Script
Show your code and what you are trying to do. You can call the onchange event handler to deal with changes in the selections of a select box.

See this page and this one for more info.
Feb 17 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.