>> I'm trying to auto refresh a page when the back button is
>> clicked on the browser.  At present the page that I'm going
>> back to is an page which requires form variables from a
>> previous page to run - if I hit back I get the usual
>> "Page Expired" message
>
> There's not really any way to change this behavior without
> changing the form's method from "post" to "get" which will
> cause all the form fields to be passed in the url instead.
>
> S. Isaac Dealey
> Certified Advanced ColdFusion 5 Developer
>
> www.turnkey.to
> 954-776-0046

.. Wasn't this from a long time ago?

In retrospect I think it might be possible to maintain the form
method="post" and eliminate the alert by using something like this:

<cfif structkeyexists(form,"mykey")>
  <cflock scope="session" type="exclusive" timeout="10">
  <cfset session.myformvars = duplicate(form)></cflock>

  <cflocation url="#cgi.path_info#" addtoken="no"><cfabort>
<cfelse>
  <cflock scope="session" type="readonly" timeout="10">
  <cfif structkeyexists(session,"myformvars")>
    <cfset temp = StructAppend(form,session.myformvars,true)>
  </cfif></cflock>
</cfif>

Off-hand I'm not sure what other issues this might introduce however...

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to