View Single Post
  #1 (permalink)  
Old January 20th, 2006, 04:49 PM
nmreid nmreid is offline
Registered User
Join Date: Jan 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Set Default selection in ListBox

I've created a listBox in a form. I can get the index of the selected option using "listId = document.form.list.selectedIndex" and that works fine.

BUT - how do I get it to work in reverse and set the selected option with a parameter passed to the page? (e.g. page.asp?ListId=3 )

I think it's something like document.form.list[ListId].Selected=True
but whatever I do I just can't get this to work.

Any help gratefully appreciated.
Reply With Quote