This content has been marked as final. Show 4 replies
Link the anchor tag to another cf page and change the variable there.
iframes might be helpful. More helpful than the preceding paragraph in fact.
It sounds like Dan's suggestion is your best bet - you can even link to the same page, passing a URL variable at the end of the link that you can use to change your CF variable:
<cfparam name="myVarA" defalut="B">
<cfset myVarA = URL.myVar1>
<a href="myPage.cfm?myVar1=foo">#myVarA #</a>
Can you tell us a little more about what you're trying to accomplish? There may be a better solution to your problem.
I'm creating a table with subtables that can be included by clicking a (+) on expandable areas. I figured if I toggled a boolean var, when a plus (or minus), was clicked the page would be refreshed with the table displaying the new query depending on which vars were set to true or false.
You should be able to format all your links like this:
<cfparam name="bShowSection" default="">
<a href="myPage.cfm?bShowSection=first_section">+</a> First Section
<cfif URL.bShowSection eq "first_section">
<!--- process code, include file, run query, etc --->