Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


set default selection in ListBox

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,30178
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> set default selection in ListBox
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 set default selection in ListBox - 1/22/2006 11:10:17 PM   
  nmreid

 

Posts: 1
Score: 0
Joined: 1/22/2006
Status: offline
How can I set the default selection in a ListBox in VbScript? I know how to get the index value using listIndex, but what I cannot get to work is then setting the defaukt value of the selected option.
 
What I'm trying to do is something along the following lines:-

    filename.asp?itemNo=3
   
    document.form1.ListBox.List[ItemNo].selected=true


But whatever I try to do, I just cannot get it to work.

Any help / suggestions gratefully appreciated.
 
 
Post #: 1
 
 RE: set default selection in ListBox - 1/23/2006 4:13:19 AM   
  Country73


Posts: 716
Score: 8
Joined: 8/25/2004
From: USA
Status: offline
Welcome to VBScript Forum,

What exactly are you wanting to do here?
On your webpage, are you wanted a specific option to be displayed from your listbox, or are you wanting to set a variable according to what is selected from the listbox?

(in reply to nmreid)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> set default selection in ListBox Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts