[web] Cross Between Select and Input Form

Started by
11 comments, last by Tradone 17 years, 12 months ago
For example, let's say I have the following

<select name="linkTarget">
<option value="_self">_self</option>
<option value="_self">_parent</option>
<option value="_self">_top</option>
</select>


and I want the user to also be able to type in his desired target frame, directly into the select box. Now is this possible? Like just type directly in there. like the address window of the internet explorer, the first couple of websites I've been visiting are listed when I click the arrow on the right, but I can erase all that and write my own information. b/c I don't think this is possible, but just an idea.
Advertisement
It's not possible to do unless you make your own DHTML control. For a person experienced in JS and the DOM, it's an easy thing to do. Just have a normal <input type="text" /> control with an onclick that opens up a <select (multiple) /> control absolutely positioned directly underneath it.
Quote:Original post by konForce
It's not possible to do unless you make your own DHTML control. For a person experienced in JS and the DOM, it's an easy thing to do.

any kind of links will be appreciated..


Quote:Original post by konForce
Just have a normal <input type="text" /> control with an onclick that opens up a <select (multiple) /> control absolutely positioned directly underneath it.

That's what I'm doing right now, but it's rather cumbersome.
I have a select box and if you select other, an input text appears right next to it. but, again it's cumbersome.
Hey,

You could try here here for DHTML tutorials.

Hope that helps mate,

Dave
Thanks Dave, looking at the examples from DHTML DOM, it seems like I've been able to do those without knowing that they were DHTML DOM. BTW that was a spectacular link, extremely content rich, useful &#106avascripts.<br><br>but i don't think I can accomplish what I'm trying to do... can I?<br>it's like creating a whole new input type.<br>exactly the same thing as just like internet explorer's address location bar.<br>you can select from the right, or input your own text in the same input form.<br><br>It seems like the previous answers are implying that it is possible using DOM and DHTML. but from the information that I've gathered from the W3C and such, I don't think it's possible.
What you are trying to create is known as a "combo box". In order for it to work, you need to pre-load all of the possible search results into an array and have an onChange event called on the INPUT field, which will create/update a DIV tag which is positioned directly below the INPUT field.

Here is a good example, with code.

Good luck to you!
Quote:Original post by Tesseract
What you are trying to create is known as a "combo box". In order for it to work, you need to pre-load all of the possible search results into an array and have an onChange event called on the INPUT field, which will create/update a DIV tag which is positioned directly below the INPUT field.

Here is a good example, with code.

Good luck to you!


Ajax removes the need to preload all of the data.
hm... I see.
I can't do much about making a new input type, but I can somewhat fabricate something like it.

okay, i get the gist of it now. Thanks
Quote:Original post by tstrimp
Quote:Original post by Tesseract
What you are trying to create is known as a "combo box". In order for it to work, you need to pre-load all of the possible search results into an array and have an onChange event called on the INPUT field, which will create/update a DIV tag which is positioned directly below the INPUT field.

Here is a good example, with code.

Good luck to you!


Ajax removes the need to preload all of the data.


True, but if Tradone doesn't have access to middleware, or is not experienced enough with the various technologies to set it up, then a js array would be the next best thing.

Jesus Christ did you guys check this link out?
God damn.....
Open in new window
Really, this link just made me think that there is actually a lot more that can be done on the web than just searching on google.
and yes, they are called comboboxes, thanks for the information guys. I rated everybody up that was involved.
edit: They are just incredible.
Their work is unbelievable. It has the same capabilities if not more than the windows environment. It is just amazing, astounding. Unbelievable.

Come to think about it, I knew had all the knowedge required to make a combobox. It is just a div layer that floats under the input when there are certain matching characters in the input box. Very interesting.

[Edited by - Tradone on April 17, 2006 5:26:52 PM]

This topic is closed to new replies.

Advertisement