View Full Version : Selectbox script error

05-08-2004, 09:16 PM
I keep getting errors with this script.

Note: The name of the form is form, so that's right too. :thumbsup:
Here is the code for the select box:
<select name="simselect" size="1">
<option value="0001">0001</option>
<option value="0002">0002</option>

Here is the script: (I narrowed it down to this spot)
if(document.form.simselect.options[document.form.simselect.selectedindex].value == "0001") {
//I took this section out and still got the error

05-08-2004, 09:30 PM
if(document.form.simselect.options[document.form.simselect.selectedIndex].value == "0001") {

The property is selectedIndex, not selectedindex.

Hope that helps!

Happy coding! :)

05-08-2004, 09:46 PM
Thanks a lot! :) :thumbsup: