yeah, that's true, give it a whirl and let me see what you come up with,
i always love new ideas.
Although, think about this.... if you run the action="set" BEFORE you
get to the form then you don't have to worry about saving the form
variables, just the URL of where to send the user to.
I just built it into an app today that allows my administrators to edit
HTML blocks on our site, then when they're done it returns them to the
page they were on to view the changes. Take a look at these 3 case
statements and see if it makes a little more sense. (Read from bottom
to top).
<cfcase value="updateblock">
<!--- this cleans (adds #request.urltoken# to hrefs) and saves the HTML
to the database, then returns the user back to the page they
were on before this process --->
<cfinclude template="act_cleanhtml.cfm">
<cfinclude template="act_updateblock.cfm">
<cf_returnfuseaction
action="return">
</cfcase>
<cfcase value="editblockform">
<!--- this generates a form for editing an html "block", when they
click the save button it sends them to fuseaction="updateblock" --->
<cfinclude template="qry_block.cfm">
<cfinclude template="dsp_blockform.cfm">
</cfcase>
<cfdefaultcase>
<!--- this adds a URL to the client.returnfuseaction list --->
<cf_returnfuseaction
action="set"
returnurl="#cgi.http_referer#"
gotourl="index.cfm?fuseaction=editblockform">
</cfdefaultcase>
Steve
Hal Helms wrote:
>
> I agree with the idea, but I'm not sure of the current implementation. Let's
> take a specific example. I want to perform fuseaction "doThis". I am passing
> a set of hidden and exposed form variables to the index.cfm with a
> fuseaction of "doThis". But now, I want to suspend the operation and make
> the user perform another fuseaction, "doThat". When the user is all done, I
> want him/her to go back to "doThis" AND I want all those form variables
> restored.
>
> In other words, I want a snapshot of my state taken, then have the user do
> something else, then go back to "doThis" with all those original form
> variables intact. In looking at the code, it doesn't seem that it's tring to
> save any form variables.
>
> I'm going to post a refinement to returnfuseaction and see if you don't like
> it better -- at least it works better for me. It suspends the state, then
> restores the state and does this as form variables, so that sensitive
> variables aren't exposed as readily.
>
> Hal Helms
> == See www.ColdFusionTraining.com for info on "Best Practices with
> ColdFusion & Fusebox" training, Jan 22-25 ==
>
> -----Original Message-----
> From: Steve Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 3:42 PM
> To: Fusebox
> Subject: Re: returnfuseaction
>
> ya, it would convert the form variables to URL variables ala
> <cf_formurl2attributes>. So it does have the limitation of 1000
> characters in the URL. The main reason is that cflocation doesn't allow
> for form variables.
>
> I haven't found this to be a problem because I find that I end up
> setting the returnfuseaction before the page that the user is inputting
> information in a form. Does that make sense?
>
> I'll try and do some more tutorials on this tag in the next week or so.
> It's an amazingly powerful tag and will make your life much easier. :)
>
> Steve Nelson
> Online Web Development Training:
> http://www.SecretAgents.com/training
> (804) 825-6093
>
> Hal Helms wrote:
> >
> > Hey, you returnfuseaction folks, can someone help me out? I went through
> > Steve's viewlet, but I'm still not sure: If I want to add an item to cart
> > and my code uses both a URL variable and a hidden form variable to
> submit,
> > will the form vars be saved and then later restored? If not, does
> > returnfuseaction only work with querystrings and not form vars?
> > Hal Helms
> >
> > == See www.ColdFusionTraining.com for info on "Best Practices with
> > ColdFusion & Fusebox" training, Jan 22-25 ==
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists