btw, i just came across some of my code i wrote a few months back that's
a pretty slick example of the returnfuseaction tag.
<!---/orders/index.cfm--->
<cfdefaultcase>
<cfmodule template="#request.cfroot#/members/act_secure.cfm"
message="To checkout you must login, please do so now">
<cfinclude template="url_verifyaddress.cfm">
<cfinclude template="dsp_orderinfo.cfm">
</cfdefaultcase>
<!---url_verifyaddress.cfm--->
<cfif not len(trim(request.getuser.shipping_address_id))>
<cf_returnfuseaction
gotourl="#request.sslroot#/members/addresses/index.cfm?fuseaction=chooseshipping"
returnurl="#request.sslroot#/shoppingcart/checkout/index.cfm?order_id=#attributes.order_id#"
action="set">
</cfif>
This is part of the checkout script on http://www.ValueMusic.com. You
can see it in action by putting something in your shopping cart and
clicking "Checkout" (You don't have to actually purchase anything).
The /orders/index.cfm CFDEFAULTCASE actually calls the
cf_returnfuseaction tag twice.
Once in the act_secure.cfm, this checks to see if the user is logged in
or not, if not it'll send them to the login screen forcing them to
login. Once they've logged in, they'll be sent back to the
CFDEFAULTCASE
Then url_verifyaddress.cfm will verify that they have chosen a shipping
address. If they haven't it'll send them to the /members/addresses
circuit app and force them to choose (or add) a shipping address. Once
they've chosen a shipping address it'll send them back to the the
CFDEFAULTCASE and they can see their order form.
Does that make sense?
I'll make a tutorial walking through this process.
Steve Nelson
Online Web Development Training:
http://www.SecretAgents.com/training
(804) 825-6093
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