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

How can I type in the combo box <select> ?

0 views
Skip to first unread message

fniles

unread,
Jun 16, 2009, 5:12:19 PM6/16/09
to
In VB if I use a ComboBox with Style = 0 - Dropdown Combo, besides selecting
an item from the drop down box, I can also type in the combobox.
In ASP, when I use <select>, is it possible to type in the combox box ?
Thank you.

<select name="S1"></select>
<script language="JavaScript">
var oOption = document.createElement("OPTION");
oOption.text="one"
document.all.item("S1").add(oOption);
</script>


Evertjan.

unread,
Jun 16, 2009, 5:25:22 PM6/16/09
to
fniles wrote on 16 jun 2009 in microsoft.public.inetserver.asp.general:

> In VB if I use a ComboBox with Style = 0 - Dropdown Combo, besides
> selecting an item from the drop down box, I can also type in the
> combobox. In ASP, when I use <select>, is it possible to type in the
> combox box ? Thank you.

Classical ASP does not know about comboboxes

I myself do not even know, nor want to know what a combobox is.

>
> <select name="S1"></select>
> <script language="JavaScript">
> var oOption = document.createElement("OPTION");
> oOption.text="one"
> document.all.item("S1").add(oOption);
> </script>

This is alle clientside code.

Please do not post such to this NG microsoft.public.inetserver.asp.general


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Adrienne Boswell

unread,
Jun 16, 2009, 5:57:44 PM6/16/09
to
Gazing into my crystal ball I observed "fniles" <fni...@pfmail.com>
writing in news:O01oocs7...@TK2MSFTNGP03.phx.gbl:

First of all, what you are talking about is client side, and should be in
a client side group. You could go to comp.languages.javascript or
comp.infosystems.www.authoring.html, but the real answer to your question
is that you just can't do that. The select element only allows option
elements, and the option element cannot receive input from the client.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Tim Slattery

unread,
Jun 17, 2009, 8:46:46 AM6/17/09
to
Adrienne Boswell <arb...@yahoo.com> wrote:

>First of all, what you are talking about is client side, and should be in
>a client side group. You could go to comp.languages.javascript or
>comp.infosystems.www.authoring.html, but the real answer to your question
>is that you just can't do that. The select element only allows option
>elements, and the option element cannot receive input from the client.

Right. This is not dependent on VBS or any other scripting language,
but on HTML. And HTML simply doesn't have anything corresponding to a
combo box.

--
Tim Slattery
MS MVP(Shell/User)
Slatt...@bls.gov
http://members.cox.net/slatteryt

Bob Barrows

unread,
Jun 17, 2009, 9:42:05 AM6/17/09
to
Tim Slattery wrote:
> Adrienne Boswell <arb...@yahoo.com> wrote:
>
>> First of all, what you are talking about is client side, and should
>> be in a client side group. You could go to comp.languages.javascript
>> or comp.infosystems.www.authoring.html, but the real answer to your
>> question is that you just can't do that. The select element only
>> allows option elements, and the option element cannot receive input
>> from the client.
>
> Right. This is not dependent on VBS or any other scripting language,
> but on HTML. And HTML simply doesn't have anything corresponding to a
> combo box.
>
... which is not to say that one could not use a combination of
client-side script, css and html to roll one's own. In fact, I would be
shocked if code to do this is not easily findable via a google search.
Of course, such an approach would require some browser-sniffing to make
sure the browser settings/capabilities support the functionality of the
solution.

--
HTH,
Bob Barrows


Adrienne Boswell

unread,
Jun 17, 2009, 11:19:21 AM6/17/09
to
Gazing into my crystal ball I observed "Bob Barrows" <reb01501
@NOyahoo.SPAMcom> writing in news:#3V3oF17...@TK2MSFTNGP02.phx.gbl:

You know, it's something that is asked about quite a lot in the client
side groups. I'm surprised that this isn't something that hasn't been
brought into the specs. Especially since one can do select multiple, why
not select with input? Tim, are you listening?

fniles

unread,
Jun 17, 2009, 4:54:22 PM6/17/09
to
I posted this question on the ASP group as well as the vbscript and jscript
group.
Adrienne, you mentioned that the question was asked a lot in the client side
groups, was there an answer for it ?

Thanks

"Adrienne Boswell" <arb...@yahoo.com> wrote in message
news:Xns9C2D54A8AAAD...@85.214.105.209...

Bob Barrows

unread,
Jun 17, 2009, 5:13:41 PM6/17/09
to
Forgive me for answering for her, but the answer was in my previous
reply:
http:lmgtfy.com/q=html+combo+box

There are several useful hits on the first page of results.

--
HTH,
Bob Barrows


Adrienne Boswell

unread,
Jun 18, 2009, 10:22:30 AM6/18/09
to
Gazing into my crystal ball I observed "fniles" <fni...@pfmail.com>
writing in news:Ow2VQ347...@TK2MSFTNGP03.phx.gbl:

Please do not top-post. See reply at bottom.

If you had not top posted, you would have read my previous reply that
said:
"The real answer to your question is that you just can't do that.


The select element only allows option elements, and the option element
cannot receive input from the client."

So, no, it cannot be done, at least not without some client side script
(as Bob mentioned earlier in this thread), with HTML.

Again, this is all client side, client side, client side.

Helped?

unread,
Jul 16, 2009, 10:24:01 PM7/16/09
to
0 new messages