clever list boxes

2000-07-17 Thread Phil Palmer

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"








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--
--
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.



Re: clever list boxes

2000-07-17 Thread rkeniger



>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.

What you want is a combo box which is not a standard HTML element. You can do
this with a combination of a SELECT list box and a text input box. I have also
use DHTML to create a pop-up menu attached to a list box.

>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.

You can't do this with CF - this is client-side and you would need to use
Javascript. Unless you had a very small number of values this would not be
practical to do because you would have to load all the possible values into a
massive javascript array and check them on each keypress - better not to bother.

You would probably crash the browser if you had a big enough list of values.

Welcome to the web's stateless environment - very few data retrieval operations
can be performed in browsers on the fly - almost all Web DB stuff is necessarily
a multiple-screen, request-response paradigm.


Rob Keniger


--
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.



RE: clever list boxes

2000-07-17 Thread Dan Haley

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"








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--

--
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.