|
 |
|
 |
 |
12-24-2004, 12:51 PM
|
#1 (permalink)
|
|
Registered User
Join Date: Dec 2004
Posts: 5
|
A drop down menu you can type into
I've been looking all over to find a way to create a drop down menu that a user can tab into and type in. If they click the drop down arrow, a menu will drop giving them options if they want. But otherwise they can simply type their selection into it.
Microsoft Outlook has an example of this with their "Find a Contact" menu at the top of the screen.
Does anyone know how this is done? 
__________________
|
|
|
12-24-2004, 01:07 PM
|
#2 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,397
|
there is no html component that will do that. microsoft office is an application of its own.
the closes thing might be to have both a drop down box (select box) and a seperate text field.
__________________
testing 1 2 3
|
|
|
12-24-2004, 01:09 PM
|
#3 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,397
|
well now that i think about it a little more, .. gmail does it.
i think they are using heavy CSS to do it though. it's not exactly an html component that you can just use.
__________________
testing 1 2 3
|
|
|
12-25-2004, 07:20 PM
|
#4 (permalink)
|
|
Regular Contributor
Join Date: Oct 2004
Posts: 192
|
i have some ideas on how to do this, if you can wait about a week or so, i think ill beable to do this.
__________________
|
|
|
12-25-2004, 07:57 PM
|
#5 (permalink)
|
|
Regular Contributor
Join Date: Oct 2004
Posts: 192
|
Hell yes! Screw a week, i got it working in under an hour. Im pretty sure the code below will do what you want. Works in IE, opera, and mozilla.
Code:
<script language="JavaScript">
function prompt_option(obj) {
if(obj.value == "other") {
var other= prompt('Please enter ...........', ' ');
document.forms["form1"].dropdown.options["4"] = null;
document.forms["form1"].dropdown.options["4"] = new Option(other, other, false, true);
}
}
</script>
<form method="" action="" name="form1">
<select size="1" name="dropdown" onChange="prompt_option(this)">
<option value="chioce1">chioce1</option>
<option value="choice2">choice2</option>
<option value="choice3">choice3</option>
<option value="choice4">choice4</option>
<option value="other">other</option>
</select>
__________________
|
|
|
12-26-2004, 09:32 AM
|
#6 (permalink)
|
|
Regular Contributor
Join Date: Oct 2004
Posts: 192
|
i was messing around with the script i wrote and you mite want to run a quick if statement after the prompt to make sure its not null or empty like
Code:
if(other != "" || other != null) {
__________________
|
|
|
12-26-2004, 11:37 AM
|
#7 (permalink)
|
|
Java fanboy
Join Date: Aug 2003
Posts: 1,114
|
We have a prefectly good example on hand; just click the down arrow next to the "Search" or "Links" section up at the top. Reverse engineer it and boom, you've got exactly what you want.
|
|
|
12-26-2004, 11:45 AM
|
#8 (permalink)
|
|
Regular Contributor
Join Date: Oct 2004
Posts: 192
|
wait, fightingillini are you talking about a html form select or something else? because if you meant a html form select, the one i made will work fine with what you want to do.
__________________
|
|
|
12-27-2004, 12:13 PM
|
#9 (permalink)
|
|
Registered User
Join Date: Dec 2004
Posts: 5
|
I'm talking about an HTML form. I'm trying to find an example on a web page somewhere that we can use for reference. It would be a regular drop down menu. The only thing that's different is that a user can click on it, like a text box, and type an entry in. Or they could click the menu's down arrow and see the drop down list of options and could choose from one of those.
The menus at the top (search, etc.) aren't what I'm looking for -- sorry.
I'll keep looking around for another example of it -- I know I've seen them a couple places before but the only one I can see right now is the one in MS Outlook. I'll also give the above code a try. Thanks!
__________________
|
|
|
12-27-2004, 05:07 PM
|
#10 (permalink)
|
|
Regular Contributor
Join Date: Oct 2004
Posts: 192
|
the above code is a normal html select form field. but when the user clicks on the other option in the select, a prompt window opens up and if they type something in the prompt, then it replaces other, with what they typped in the prompt. if this is close to what you want, but not quite explain what you want in good detial, and i know i can do it if it's possible.
__________________
|
|
|
12-27-2004, 06:56 PM
|
#11 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,397
|
check out the 'function search' on http://php.net
type in in the text box and you should see a drop down too. i think that is as close as you are gonna get.
__________________
testing 1 2 3
|
|
|
12-29-2004, 08:07 AM
|
#12 (permalink)
|
|
Registered User
Join Date: Dec 2004
Posts: 5
|
Thanks for all your help. I'm going to take falsepride's idea back to my user and see what they think or if they want to go a different route -- now that I can tell them that the original idea was missing a couple screws...
__________________
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 06:44 PM.
|
Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle
|
 |
|