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

F

fniles

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>
 
E

Evertjan.

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
 
A

Adrienne Boswell

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>

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.
 
T

Tim Slattery

Adrienne Boswell said:
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.
 
B

Bob Barrows

Tim said:
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.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed "Bob Barrows" <reb01501
@NOyahoo.SPAMcom> writing in
... 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.

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?
 
F

fniles

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
 
B

Bob Barrows

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top