Simon,
My advice. Stop using CFFORM!!! For all the cool things it supposedly does for you,
there's a matching set of restrictions it creates. Use standard HTML for forms.
Next, refer back to the posts from last week for the same discussion.
The solution is to output your company's state as the first item on the list rather
than trying to figure out whether it should be selected or not. Then output the
remaining states.
---mark
--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------
> -----Original Message-----
> From: Park, Simon [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 03, 2000 11:56 AM
> To: [EMAIL PROTECTED]
> Subject: my pre-selected select box - why won't this work?
>
>
> Sorry, this is probably very simple but I can't figure it out. I have a
> pre-selected value on my select box but it won't display. It should
> pre-select Maryland but it goes to the first option, Alaska. If I
> hard-code
> "MD" into the 'SELECTED' parameter of the CFSELECT tag, the right
> option is
> selected but if it is drawn from the query, it is wrong. Can
> anyone tell me
> why?
>
> The URL is:
> http://206.239.48.11/test.cfm
>
> The code is:
> <CFQUERY name="query_state" datasource="closingquotesdev">
> SELECT state_des, state_abbrev
> FROM states
> ORDER BY state_abbrev
> </CFQUERY>
>
> <CFQUERY NAME="GetCompanyAddress" datasource="closingquotesdev">
> SELECT state
> FROM dbo.comp_address
> WHERE comp_address.company_address_id = 299
> </CFQUERY>
>
>
> <CFOUTPUT>GetCompanyAddress.state:
> #GetCompanyAddress.state#</CFOUTPUT><BR><BR>
> <CFFORM ACTION="" METHOD="POST">
> <FONT face="MS SANS SERIF, HELVETICA" size="-1">State: <FONT
> COLOR="Red">*</FONT><BR>
> <CFSELECT NAME="state" MESSAGE="Please select your state."
> QUERY="query_state" VALUE="state_abbrev" DISPLAY="state_des"
> SELECTED="#GetCompanyAddress.state#"></CFSELECT></FONT>
> </CFFORM>
>
>
> Thanks.
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Simon Park Computer Systems Management, Inc.
> [EMAIL PROTECTED] 205 South Whiting Street
> Ph: 703-823-4300 Suite 201
> fax: 703-823-4301 Alexandria, VA 22304
> http://www.csmi.com
> ------------------------------------------------------------------
> ------------
> 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.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message
to [EMAIL PROTECTED] with 'unsubscribe' in the body.