<tr>
 <td>Country</td>
 <td>
  <select name="addr_country">
   <cfoutput query="getCountries">
    <option value="#getCountries.cty_iso2#" <cfif variables.addr_country eq 
getCountries.cty_iso2>selected<cfelseif not len(trim(variables.addr_country)) 
and getCountries.cty_iso2 eq 
'US'>selected</cfif>>#getCountries.cty_name#</option>
   </cfoutput>
  </select>
  </td>
</tr>
 and I am using this query 
<cfquery name="getCountries" datasource="country table">
        SELECT          cty_iso2, cty_name
        FROM            ref_countries
        ORDER BY        cty_name
</cfquery>
but unfortunately, the correct country is not getting selected. If a country 
value is there, I want it to be selected, if nothing is there, I want United 
States as default. The column cty_iso2 has two letter code for the country like 
'US' and cty_name contains the whole name like United States of America. I am 
not able to pi point what's wrong with this code. Also, I convert all the form 
fields values into vairables scope before the start of the page. Please help. 
Thanks for help in advance. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310738
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to