Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-03-2003, 03:24 PM   PM User | #1
gcapp
Regular Coder

 
Join Date: Aug 2002
Posts: 247
Thanks: 0
Thanked 0 Times in 0 Posts
gcapp is an unknown quantity at this point
option tag

Can some one help me? I am new to Coldfusion and I am learning how ot code with it. I have this query code:

<CFQUERY NAME ="City" DATASOURCE="Kissaudio">
SELECT DISTINCT
Kiss_Shows.CITY
FROM Kiss_Shows
ORDER BY CITY asc
</CFQUERY>

and this code to fill in my drop-down list:

<cfform method="POST" action="body.cfm">
<cfselect name="showcity" query="City"
value="CITY"
display="CITY"
required="yes"
size="1">
</cfselect></p>
<br><input type="Submit" value="Pick A City">
</cfform>

I'm trying to insert an option tag, so when the drop-down list appears, the first selected value is "Choose A City". How do I do that in the the code above?

I'm trying to use my ASP knowledge to help, but I've found that the languages are not quite the same, so I'm not sure how to put tha option tag in the above code.

Thanks,
Gary
gcapp is offline   Reply With Quote
Old 04-08-2003, 11:08 PM   PM User | #2
CFMX RULES
New Coder

 
Join Date: Apr 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
CFMX RULES is an unknown quantity at this point
<CFQUERY NAME ="City" DATASOURCE="Kissaudio">
SELECT DISTINCT
CITY
FROM Kiss_Shows
ORDER BY CITY asc
</CFQUERY>

<form method="POST" action="body.cfm">
<cfoutput query="city">
<select name="showcity">
<option value="#city#">#city#</option>
</select>
</cfoutput>

<br><input type="Submit" value="Pick A City">
</form>
CFMX RULES is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:07 PM.


Advertisement
Log in to turn off these ads.