[web] Cross Between Select and Input Form

This topic is 4442 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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.

Share on other sites
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.

Share on other sites
Quote:
 Original post by konForceIt'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 konForceJust have a normal control with an onclick that opens up a

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.

Share on other sites
Hey,

You could try here here for DHTML tutorials.

Hope that helps mate,

Dave

Share on other sites
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 javascripts.

but i don't think I can accomplish what I'm trying to do... can I?
it's like creating a whole new input type.
exactly the same thing as just like internet explorer's address location bar.
you can select from the right, or input your own text in the same input form.

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.

Share on other sites
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!

Share on other sites
Quote:
 Original post by TesseractWhat 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.

Share on other sites
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

Share on other sites
Quote:
Original post by tstrimp
Quote:
 Original post by TesseractWhat 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.

Share on other sites
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]

• 40
• 12
• 10
• 10
• 9
• Forum Statistics

• Total Topics
631371
• Total Posts
2999606
×