Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


List boxes

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> List boxes
  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 >>
 List boxes - 5/22/2001 11:42:41 PM   
  subnation

 

Posts: 20
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
I know it seems a bit stupid but...
I wish to have two option boxes, one under the other yeah..
Accessing the info for these list boxes from a db the info is going into the one box, where i want two seperate ones.

'ere is my code.

'----------------------------------------------------------
' execute the command, thereby populating the adoRS recordset
Set adoRS = adoCmd.Execute

Do while not adoRS.EOF

dim CatStrs, ValueSubs

call GetFullSubModelsDesc (adoRS, CatStrs, ValueSubs)
'--Gives year range & sub model--
Response.Write "<option value =""" & server.HtmlEncode(ValueSubs) & """>" & adoRS("YearBegin").value & " - " & adoRS("YearEnd").value & " " & CatStrs & "</option>" & vbCrLf

Response.Write "<option value =""" & server.HTMLEncode(ValueSubs) & """>" & adoRS("ModelDescription").value & "</option>" & vbCrLf
adoRS.MoveNext
Loop
'----------------------------------------------------------
I'd be grateful for any help ;)
 
 
Post #: 1
 
 Re: List boxes - 5/22/2001 11:45:01 PM   
  Mighty

 

Posts: 11
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
Instead of putting your response.writes inside of your loop, build your option tags for each listbox into string variables, one variable for each listbox. Then, when you're done with your loop, response.write each of the string variables (that now contain all the text needed to build a select element with all its options).

(in reply to subnation)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> List boxes 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