Here is what I have inside of my select statement:
<cfloop query name="country">
<option value="#CountryName#"><cfoutput>#Cou开发者_如何学PythonntryName#</cfoutput></option>
</cfloop>
Everything works fine, but the value it passes to my URL filter is #CountryName#, not the actual country name (i.e. Canada).
How can I assign it the value of the country name and not the variable name?
The #CountryName# variable is not being evaluated because it is outside your output tags. Move the tags so they encompass your value
too.
<cfoutput><option value="#CountryName#">#CountryName#</option></cfoutput>
Or just use a <cfoutput query="...">
instead of <cfloop>
.
精彩评论