Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-08-2004, 08:16 PM   PM User | #1
CreativeGPX
New to the CF scene

 
Join Date: Mar 2004
Location: Milky Way Galaxy
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
CreativeGPX is an unknown quantity at this point
Selectbox script error

I keep getting errors with this script.

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

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
}
CreativeGPX is offline   Reply With Quote
Old 05-08-2004, 08:30 PM   PM User | #2
nolachrymose
Regular Coder

 
Join Date: Jun 2002
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
nolachrymose is an unknown quantity at this point
Code:
if(document.form.simselect.options[document.form.simselect.selectedIndex].value == "0001") {
The property is selectedIndex, not selectedindex.

Hope that helps!

Happy coding!
nolachrymose is offline   Reply With Quote
Old 05-08-2004, 08:46 PM   PM User | #3
CreativeGPX
New to the CF scene

 
Join Date: Mar 2004
Location: Milky Way Galaxy
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
CreativeGPX is an unknown quantity at this point
Thanks a lot!
CreativeGPX is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:21 AM.


Advertisement
Log in to turn off these ads.