Something I do.
I do server side validation and always submit forms to themselves. At the
top I set something like this:
<cfparam name="variables.home_country" default="0">
<!--- In here I check if form has been submitted if it has I set:
<cfset variables.home_country = #formhome_country#>
<!--- error checking --->
Send to next page if okay if not show page again with values populated.
Then down below I have this:
<font face="Verdana,Arial,Helvetica" size="1">Country:</font>
<select name="home_country" size="1"><option value="" selected>Select a
Country:<cfoutput query="application.country_list"><option
value="#country_id#" <cfif #variables.home_country# is
application.country_list.country_id>selected</cfif>>#country_desc#</option><
/cfoutput></select>
For the option to enter in other I use a blank box below the select box and
if they choose other from select box they can
enter other information. I do checks on that to make sure they enter
something if they choose other.
Hope this helps some.
-----Original Message-----
From: Hubert Earl [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 06, 2000 2:53 PM
To: [EMAIL PROTECTED]
Subject: Question concerning select box code
This is a multi-part message in MIME format.
------=_NextPart_000_002A_01BF9FD7.D436A800
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
hi,
i'm working on a select list box for an update form. what code do i =
need to use to:=20
a. populate the box with the value already chosen or
b. allow the user to either=20
1. choose the other value(s) in the box or=20
2. enter a value not already there (if possible)?
sincerely,
---
Hubert Earl
ICQ#: 16199853
I develop & maintain web sites internationally. I also build web =
applications using CGI scripts written in Perl. I accept subcontracting =
work.
**Personal web site: http://www.geocities.com/SiliconValley/Peaks/8702/
(please remember to view this with a sense of humour!)
**Business web page: http://home.talkcity.com/MigrationPath/hearl/
------=_NextPart_000_002A_01BF9FD7.D436A800
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT color=3D#000000 face=3D"MS Sans Serif" size=3D2>
<P>hi,</P>
<P> i'm working on a select list box for an update form. what code =
do i=20
need to use to: </P>
<P>a. populate the box with the value already chosen or</P>
<P>b. allow the user to either </P>
<P>1. choose the other value(s) in the box or </P>
<P>2. enter a value not already there (if possible)?</P></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2>sincerely,</FONT></DIV></FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---<BR>Hubert Earl<BR>ICQ#: =20
16199853</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I develop & maintain web sites=20
internationally. I also build web applications using CGI scripts =
written=20
in Perl. I accept subcontracting work.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>**Personal web site: <A=20
href=3D"http://www.geocities.com/SiliconValley/Peaks/8702/">http://www.ge=
ocities.com/SiliconValley/Peaks/8702/</A><BR>(please=20
remember to view this with a sense of humour!)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>**Business web page: <A=20
href=3D"http://home.talkcity.com/MigrationPath/hearl/">http://home.talkci=
ty.com/MigrationPath/hearl/</A></FONT></DIV></BODY></HTML>
------=_NextPart_000_002A_01BF9FD7.D436A800--
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
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.eGroups.com/list/cf-talk
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.