Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Adding elements to dropdown list

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Adding elements to dropdown list
  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 >>
 Adding elements to dropdown list - 10/17/2002 6:04:21 PM   
  wozzan

 

Posts: 2
Score: 0
Joined: 10/17/2002
From:
Status: offline
Hi
I have 2 dropdown boxes on a page that are currently hidden using layers. I want to populate the dropdown listboxes using vbscript and thought that there was an .additem method that could be used to do this. I am using an xml file to hold the data and want show one listbox after the user has made a selection, and then use that selection to populate the next listbox.
Any help would be appreciated, Thanks in advance Warren
 
 
Post #: 1
 
 Re: Adding elements to dropdown list - 10/17/2002 7:08:16 PM   
  wozzan

 

Posts: 2
Score: 0
Joined: 10/17/2002
From:
Status: offline
I just found the solution

' in VBScript
Set optOption = document.createElement("OPTION")
optOption.text="Oranges"
optOption.value="10"
document.all.List1.add(optOption)
quote:

Hi
I have 2 dropdown boxes on a page that are currently hidden using layers. I want to populate the dropdown listboxes using vbscript and thought that there was an .additem method that could be used to do this. I am using an xml file to hold the data and want show one listbox after the user has made a selection, and then use that selection to populate the next listbox.
Any help would be appreciated, Thanks in advance Warren




(in reply to wozzan)
 
 
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 >> Adding elements to dropdown list 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