scripter73
Programmer
I have a form that's displays text and links to a user. The links are: Date/
Insured. These also represent sort types I'm implementing.
Two things happen when user clicks on a link.
1) the same page is called
2) the form is submitted
When the form's displayed, I initialize #url.sorttype# to "insured" because the referring
page doesn't send my form anything in the url, and I need a default.
I want the following functionality:
Date Insured
On page load, user sees:
Sort Type = insured
Date Insured
When user clicks on Date link, I want to see:
Sort Type = date
Date Insured
Likewise, when user clicks on Insured, I want to see:
Sort Type = insured
Date Insured
I was passing the value 'date' or 'insured back through the url on page refresh and I
have a session var called session.sort_type to hold the value, but my problem is
that the session var isn't being updated and my page isn't refreshing properly.
I don't know what's wrong or if its my action="this(form)" attribute.
Please help. This is just a shell of a much bigger program, and I've been trying
to solve this issue for about a week. I guess I need another pair of eyes.
Here's my code if you'd like to see:
<html>
<head>
<title>Custom Tag Usage</title>
</head>
<body>
<form name="sortform" action="this(form)" method="get" onsubmit="document.sortform.refresh();">
<CFPARAM Name="SESSION.SORT_TYPE" Default="INSURED">
<cfif IsDefined("url.sorttype"
eq "FALSE">
<cfset #url.sorttype# = "insured">
</cfif>
<CFSET SESSION.SORT_TYPE = #url.sorttype#>
<CFIF #url.sorttype# eq "insured">
<cfoutput>Sort Type = #url.sorttype#</cfoutput><br>
Sort Type Insured<br>
<CFELSEIF #url.sorttype# EQ "date">
<cfoutput>Sort Type = #url.sorttype#</cfoutput><br>
Sort Type Insured<br>
</CFIF>
<A HREF="sweep.cfm" onclick="document.sortform.sorttype.value='date';document.sortform.submit();">Date</A>
<A HREF="sweep.cfm" onclick="document.sortform.sorttype.value='insured';document.sortform.submit();">Insured</A>
<input type="hidden" name="sorttype" value="">
</form>
</body>
</html>
You can see the link in action by going to
Click On Sweep Bank link, and you'll see what I mean.
Any help you can provide is appreciated.
Thanks,
scripter73
Change Your Thinking, Change Your Life.
Insured. These also represent sort types I'm implementing.
Two things happen when user clicks on a link.
1) the same page is called
2) the form is submitted
When the form's displayed, I initialize #url.sorttype# to "insured" because the referring
page doesn't send my form anything in the url, and I need a default.
I want the following functionality:
Date Insured
On page load, user sees:
Sort Type = insured
Date Insured
When user clicks on Date link, I want to see:
Sort Type = date
Date Insured
Likewise, when user clicks on Insured, I want to see:
Sort Type = insured
Date Insured
I was passing the value 'date' or 'insured back through the url on page refresh and I
have a session var called session.sort_type to hold the value, but my problem is
that the session var isn't being updated and my page isn't refreshing properly.
I don't know what's wrong or if its my action="this(form)" attribute.
Please help. This is just a shell of a much bigger program, and I've been trying
to solve this issue for about a week. I guess I need another pair of eyes.
Here's my code if you'd like to see:
<html>
<head>
<title>Custom Tag Usage</title>
</head>
<body>
<form name="sortform" action="this(form)" method="get" onsubmit="document.sortform.refresh();">
<CFPARAM Name="SESSION.SORT_TYPE" Default="INSURED">
<cfif IsDefined("url.sorttype"

<cfset #url.sorttype# = "insured">
</cfif>
<CFSET SESSION.SORT_TYPE = #url.sorttype#>
<CFIF #url.sorttype# eq "insured">
<cfoutput>Sort Type = #url.sorttype#</cfoutput><br>
Sort Type Insured<br>
<CFELSEIF #url.sorttype# EQ "date">
<cfoutput>Sort Type = #url.sorttype#</cfoutput><br>
Sort Type Insured<br>
</CFIF>
<A HREF="sweep.cfm" onclick="document.sortform.sorttype.value='date';document.sortform.submit();">Date</A>
<A HREF="sweep.cfm" onclick="document.sortform.sorttype.value='insured';document.sortform.submit();">Insured</A>
<input type="hidden" name="sorttype" value="">
</form>
</body>
</html>
You can see the link in action by going to
Click On Sweep Bank link, and you'll see what I mean.
Any help you can provide is appreciated.
Thanks,
scripter73
Change Your Thinking, Change Your Life.