Just a guess, but you might try putting using Trim in your SELECTED
varaible.  If your db state value has a space character, it would prevent it
from working.  

Jesse D. Roberts
Business Process Analyst
Procurement Quality Assurance
Boeing - Huntington Beach, CA
[EMAIL PROTECTED]
Ph. 714-896-3462
Fx. 714-896-3303

> -----Original Message-----
> From: Park, Simon [SMTP:[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.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.

Reply via email to