Remember, the proper HTML should be:

 <option value="myvalue" selected="selected"

Tom

-----Original Message-----
From: Tony Gruen [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, June 30, 2002 3:42 PM
To: CF-Talk
Subject: RE: dynamic select


easy, I presume that your list of all available makes is in another
table. If it is not and your select is hard coded just use the cfif
statement and name the query appropriately. Example below where
queryname for all available makes = qMake, and query for option to be
selected = qMakeUser:

(off the top of my head so )

<select name="make">
<cfoutput query="qMake">
<option value="#qMake.Model#"<cfif qMakeUser = #qMake.Model#>
SELECTED</cfif>>#qMake.Model# </cfoutput> </select>





Tony Gruen



-----Original Message-----
From: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 30, 2002 1:25 PM
To: CF-Talk
Subject: dynamic select


I have a query that pulls options to populate a select box, now what I
need to do is have a select that makes one of the values of the select
box "SELECTED" if it's value is in my inventory table from a second
query.

IE:

query of inventory returns the value of ford for the make column...

I need this to happen, whats the best way to do it.


<select name="make">
<option value="chevy">Chevy
<option value="honda">Honda
<option value="ford" SELECTED>Ford
</select>




Douglas Brown
Email: [EMAIL PROTECTED]



______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to