I have the following code. What I want is that when the browser selects the country, the page will automatically advance. No problem. But I also want to set the session variable. How do I do that?
<SELECT name="SelectCountry" onChange="self.location.href='/shop/hubs/builder/index.cfm'">
<CFOUTPUT query="SelectCountry">
<CFIF #CountryID# EQ "CAD">
<OPTION value="#CountryID#" selected>#CountryName#</OPTION>
<CFELSE>
<OPTION value="#CountryID#">#CountryName#</OPTION>
</CFIF>
</CFOUTPUT>
</SELECT>
Where does this go?
<CFSET #Session.sCountry# = "this[this.selectedIndex].value">
<SELECT name="SelectCountry" onChange="self.location.href='/shop/hubs/builder/index.cfm'">
<CFOUTPUT query="SelectCountry">
<CFIF #CountryID# EQ "CAD">
<OPTION value="#CountryID#" selected>#CountryName#</OPTION>
<CFELSE>
<OPTION value="#CountryID#">#CountryName#</OPTION>
</CFIF>
</CFOUTPUT>
</SELECT>
Where does this go?
<CFSET #Session.sCountry# = "this[this.selectedIndex].value">