Hi guyz, when a checkkbox is clicked other than “form.locAll”, it should store the value of those form.location in a session so that I can use them during the session. By default form.locAll is checked… The problem is: if any other cb is checked, when I clicked the “All” cb it doesnt reset other form.location cboxes. Basically it should toggle between form.locAll and form.location.
Thank you alll.
----------Code----
<cfparam name=“form.location” default=“”>
<cfparam name=“session.location” default=“All”>
<cfparam name=“url.reset” default=“0”>
<cfparam name=“url.location” default=“All”>
<cfif isdefined(‘form.LocAll’) and trim(form.LocAll) eq “All” and not isdefined(‘form.location’)>
<cfset form.location = “”>
<cfelseif isdefined(‘form.location’) and form.location neq “”>
<cfset session.location = form.location>
</cfif>
<form>
<cfoutput query="GetDivisions">
<input type="checkbox" name="<cfif trim(division) eq "All">LocAll<cfelse>location</cfif>" id="#trim(DIVISION)#" value="#trim(DIVISION)#" onClick="document.LOAAcc.submit();"
<cfif form.location eq "" and trim(division) eq "All">
checked="checked"
<cfelse>
<cfloop list="#form.location#" index="a">
<cfif trim(a) eq trim(DIVISION)>checked="checked"</cfif>
</cfloop>
</cfif>
>
<label for="#DIVISION#">#DIVISION#</label>
</cfoutput>
</form>