Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


remove options from select

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> remove options from select
  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 >>
 remove options from select - 12/13/2002 3:56:45 PM   
  DavidPinzon

 

Posts: 2
Score: 0
Joined: 12/13/2002
From:
Status: offline
hi, I have some select boxes that change their contents when some change is made.
The thing is that I have to remove even the element that is selected.
I am using:
for i = 0 to Form.Select.options.length
Form.Select.remove(i)
next
but the element that was selected remains. How do I get rid of it?
 
 
Post #: 1
 
 Re: remove options from select - 12/13/2002 4:12:45 PM   
  DavidPinzon

 

Posts: 2
Score: 0
Joined: 12/13/2002
From:
Status: offline
problem with the logic. this fixed it

for i Form.Select.options.length to 0 step -1
Form.Select.remove(i)
next

(in reply to DavidPinzon)
 
 
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 >> remove options from select 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