Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how do I delete the selected option from an options list in vbscript?

123 views
Skip to first unread message

Bruce Hittler

unread,
Mar 15, 2001, 12:17:17 PM3/15/01
to
how do I delete the selected option from an options list in vbscript?
The following code will add an option but I need to delete an option! can
anyone help?


' the list
<select name="list">
<option value="1" >text
</select>

' a add button
<input type="button" Name="add">

' Script
<script language="vbs"><!--
sub button_onclick()
' this adds an option value=0 and text = x
list.options.add window.Option("0","x")

End sub
--></script

' a delete button
<input type="button" Name="delete">


<script language="vbs"><!--
sub delete_onclick()
' how do I delete the selected option?
End sub
--></script


Michael Harris

unread,
Mar 15, 2001, 11:11:20 PM3/15/01
to
hmmmm... I seem to recall seeing the same question elsewhere!

The options collection has a (gasp!) documented remove method...

--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--

"Bruce Hittler" <bhit...@siteacquisitions.com> wrote in message
news:xO6s6.2723$Hd3.1...@news1.rdc1.ne.home.com...

sdub...@gmail.com

unread,
Jan 17, 2013, 12:07:35 PM1/17/13
to
Care to share any details or links? I have been looking for this as well...

Tom Lavedas

unread,
Jan 17, 2013, 2:43:06 PM1/17/13
to
On Thursday, January 17, 2013 12:07:35 PM UTC-5, sdub...@gmail.com wrote:
> Care to share any details or links? I have been looking for this as well...

You do realize you are posting against a thread that is nearly 12 years old (in a ng abandoned by its initiator - MS), don't you?

Anyway, try this http://msdn.microsoft.com/en-us/library/ms536694(v=vs.85).aspx
________________________
Tom Lavedas

Dave "Crash" Dummy

unread,
Jan 17, 2013, 6:22:34 PM1/17/13
to
Tom Lavedas wrote:
> On Thursday, January 17, 2013 12:07:35 PM UTC-5, sdub...@gmail.com
> wrote:
>> Care to share any details or links? I have been looking for this as
>> well...
>
> You do realize you are posting against a thread that is nearly 12
> years old (in a ng abandoned by its initiator - MS), don't you?

Don't you just love them Google Groupies? :-)

--
Crash

"It is not necessary to change. Survival is not mandatory."
~ W. Edwards Deming ~

Tom Lavedas

unread,
Jan 18, 2013, 10:16:34 AM1/18/13
to
Me (we) are one, too, I guess. ;^0
______________________
Tom Lavedas
0 new messages