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

javascript use <option> from <select> as control, help!

P: n/a
i tried to create a dropdown menu and use the option as a control to
change content inside another text area

the code is like this:

<select name="xxxx"><option onclick="changeunitprice(29.87)"
value="1744"/>

the function changeunitprice() is called when an option is selected

problem is it works well with firefox but not IE

any ideas? or is there anyway can make same effect in IE?

thanks

Jan 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
VK

frey wrote:
i tried to create a dropdown menu and use the option as a control to
change content inside another text area

the code is like this:

<select name="xxxx"><option onclick="changeunitprice(29.87)"
value="1744"/>

the function changeunitprice() is called when an option is selected

problem is it works well with firefox but not IE

any ideas? or is there anyway can make same effect in IE?


<select name="xxxx"
onchange="changeunitprice(this[this.selectedIndex].text)">
....
<option value="1744">29.87</option>
....

Jan 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.