Redirection to same page with variable values
Hi,
I am developing a form to report the data in the certain date range provided by the user.
The problem is I have to redirect the page back to original page with the error message "data not found in the date range", if the date range provided doesn't contain any data in the database. I am able to redirect the page to the original page using:
<cfif queryname.RecordCount EQ 0>
<cfset action = "error">
<Cflocation>
</cfif>
And I am using the <cfparam> for setting up an action variable to navigate through the code,
<cfparam name="action" default="">
[using the above <cfparam>, tag at the top of the code and using action EQ "report" and "" for navigation through the code]
But, when I am redirecting to the same page, with action varaible value to error and using cflocation it should forget all the varable values in the new page[as expected], so how can I pass the value of a action varaible in the same page and redirect it to the same page upon meeting certain criteria.
If not clear let me know.
Please help,
Vijayvijay77.