Welcome to WebmasterWorld Guest from 23.20.18.183

Forum Moderators: open

Message Too Old, No Replies

Accessing a ddlb with an array name

Using JavaScript

     
1:36 am on May 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Apr 17, 2003
posts:16
votes: 0


Hi All,

Using JavaScript, how do you access a drop down list boxes selectedIndex if the name of the ddlb is an array?
e.g. select name="arrayname[]"

This should be an easy one for anyone who knows JavaScript:)

Thanks in advance.

Chris.

5:18 am on May 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Apr 17, 2003
posts:16
votes: 0


C'mon guys!

Don't tell me there are no JavaScript guru's out there:)

Actually I have solved the problem.
I've been looking at the getElementById method and it seems to have done the job. The only thing is it has issues with some browsers (NN4 etc). This can be overcome by using alt syntax. (e.g. document.layers['id'])

Cheers.

Chris.