We do something similar with a drop-down box and a text box.  We make the
first item in the drop-down box "New Item" and if that is selected then we
look in the text box and add it (or ignore it if it is in the list, or raise
an error if it is empty).  If they select an entry in the drop-down AND
enter something in the text box, then we ignore the text box.  Not as
elegant as the solutions in other languages, but it works.

Dan 

-----Original Message-----
From: Phil Palmer
To: '[EMAIL PROTECTED]'
Sent: 7/17/2000 6:57 PM
Subject: clever list boxes

This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BFF05B.963A93E0
Content-Type: text/plain;
        charset="iso-8859-1"

Greetings to all from down under (Australia that is!)
 
Just wondering if I could pose a question.
 
I am building a system and the client wants a few entry fields where
they
can behave like a list
box (ie:  with a set of options loaded from a database table) but if the
option they want is not
there they can type it in and the system will add it to the database
table
for next time.
 
A few questions are :
 
1.  Can you make a list box behave this way?  I'm sure I've seen web
sites
with list boxes that
     also allow you to type characters into the box.  They could I use
an
event to test for a new
     value or something.
 
2.  Another option I guess is to use a normal text field and when they
enter
something I can
    check to see if it exists and complete the field for them.  
 
I am sure that CF allows you to do something suitably clever here - I
just
cant find it!
 
Any bright ideas appreciated.
 
Regards
 
Phil Palmer 
Technical Director 
Engage Technology Pty Ltd 
e   [EMAIL PROTECTED] 
p   0414 353 246 
w   www.engagetechnology.com.au 


------_=_NextPart_001_01BFF05B.963A93E0
Content-Type: text/html;
        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>Greetings to
all 
from down under (Australia that is!)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>Just
wondering if I 
could pose a question.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>I am
building a 
system and the client wants a few entry fields where they can behave
like a 
list</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>box
(ie:&nbsp; with 
a set of options loaded from a database table) but if the option they
want is 
not</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>there they
can type 
it in and the system will add it to the database table for next 
time.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>A few
questions are 
:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>1.&nbsp; Can
you 
make a list box behave this way?&nbsp; I'm sure I've seen web sites with
list 
boxes that</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000>&nbsp;&nbsp;&nbsp;&nbsp; also allow you to type

characters into the box.&nbsp; They could I use an event to test for a 
new</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000>&nbsp;&nbsp;&nbsp;&nbsp; value or 
something.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>2.&nbsp;
Another 
option I guess is to use a normal text field and when they enter
something I 
can</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=943305401-18072000>&nbsp;&nbsp;&nbsp; 
check to see if it exists and complete the field for them.&nbsp; 
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>I am sure
that CF 
allows you to do something suitably clever here - I just cant find 
it!</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>Any bright
ideas 
appreciated.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000>Regards</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=943305401-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=943305401-18072000>
<P><FONT face=Arial size=2>Phil Palmer</FONT> <BR><FONT color=#808080
face=Arial 
size=2>Technical Director <BR>Engage Technology Pty Ltd
<BR>e&nbsp;&nbsp; 
[EMAIL PROTECTED] <BR>p&nbsp;&nbsp; 0414 353 246
<BR>w&nbsp;&nbsp; 
www.engagetechnology.com.au
</FONT></P></SPAN></FONT></DIV></BODY></HTML>

------_=_NextPart_001_01BFF05B.963A93E0--
------------------------------------------------------------------------
------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to