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.