Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2006, 04:49 PM
Registered User
 
Join Date: Jan 2006
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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox Item selection caterpillar ASP.NET 1.0 and 1.1 Professional 1 July 26th, 2006 12:50 PM
ListBox Value Selection problem caterpillar General .NET 0 July 26th, 2006 11:41 AM
Multiple Selection of Listbox jasminecyriac ASP.NET 2.0 Basics 0 June 22nd, 2006 05:20 AM
listbox selection jon23d Access VBA 1 June 21st, 2005 01:35 PM
default selection in a datacombo neha_jn VB How-To 4 August 24th, 2004 11:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.