This is something I have used, with a little JS to reset the <Select> or
input box
just doing a quick type, so sorry for any typos.

<TR>
        <TD><input type="text" name="myfield1" value=""
onChange="myfield2.value= 'none'"></TD>
</TR>
<TR>    
        <TD>
                <SELECT NAME="myfield2" onChange="myfield1.value= ''" >
                        <OPTION value="none" SELECTED">Select
option</OPTION>
                        <OPTION VALUE="#yourval#">#text#</OPTION>
                </SELECT>               
        </TD>
</TR>

Then on the action page check if myfileld1 EQ "" or not.
or check for the value of the <SELECT> myfield2 EQ "none" or not.
hope this is close to what you are looking for.

-----Original Message-----
From: charlie griefer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 10:33 AM
To: CF-Talk
Subject: Re: need tag for dropdown and input


Valerie L. Criswell writes: 

> I know I've seen it somewhere on my journeys. 
> 
> It's the tag that displays both a dropdown (populated from a query) as
well
> as an accompanying text input so that the if the needed value isn't listed
> in the dropdown, the user can enter it into the text box.  But only one
> variable for the value is sent. 
> 
> Anyone know where I can pick this up? 
> 
> I'm not sure what to search for on the DevX.  I sure wish they would make
a
> more powerful and relevant search tool.

Not really something that i would expect to find in the DevX, regardless of 
how powerful the search tool is. 

Just do a normal <select>, as well as a text input as you described.  On the

form's action page, just run a condition to see if the text input is blank.

If it is, use the value from the <select>.  If not, use the text input 
value. 

Some js on the form to prevent both a select value and a text input value 
would be nice too.  If you need that, lemme know and i'll throw something 
together. 

charlie 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to