This is the code that was giving me trouble:
<!--- form to pick layout --->
<b>Show:</b>
Layout 1<input type="radio" name="layout" value="1"
onClick='window.location.href="index.cfm?fuseaction=changelayout&layout=1"'
<cfif session.layout is "1">checked</cfif>>
Layout 2<input type="radio" name="layout" value="2"
onClick='window.location.href="index.cfm?fuseaction=changelayout&layout=2"'
<cfif session.layout is "2">checked</cfif>>
<!--- action to change layout --->
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="changelayout">
<cfset session.layout = "#attributes.layout#">
<cflocation url="#cgi.http_referer#" addtoken="no">
</cfcase>
</cfswitch>
It worked fine in Netscrape but Internet Exploiter wouldn't go back to the
http_referer (cgi.http_referer ends up being empty).
So, I did this:
<!--- Form to pick layout --->
<b>Show:</b>
Layout 1<input type="radio" name="layout" value="1"
onClick='window.location.href="index.cfm?fuseaction=changelayout&layout=1&re
turnto=<cfoutput>#urlencodedformat(cgi.path_info)#?#urlencodedformat(cgi.que
ry_string)#</cfoutput>"' <cfif session.layout is "1">checked</cfif>>
Layout 2<input type="radio" name="layout" value="2"
onClick='window.location.href="index.cfm?fuseaction=changelayout&layout=2&re
turnto=<cfoutput>#urlencodedformat(cgi.path_info)#?#urlencodedformat(cgi.que
ry_string)#</cfoutput>"' <cfif session.layout is "2">checked</cfif>>
<!--- action to change layout --->
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="changelayout">
<cfset session.layout = "#attributes.layout#">
<cflocation url="#url.returnto#" addtoken="no">
</cfcase>
</cfswitch>
----- Original Message -----
From: "Randy Adkins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 22, 2000 1:18 PM
Subject: RE: #cgi.http_referer# and IE
> I did a test with one page, created a form, sent them to another page and
> with the http_referer, had them redirected back where they came from.
>
> TO test it I ran a session variable as a counter.
>
> Worked fine in IE 5.5 and Netscape 4.73
>
>
> -----Original Message-----
> From: Zachary Bedell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 22, 2000 2:09 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: #cgi.http_referer# and IE
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In the calling form, you could pass a hidden field w/ the name of the
> form page.
>
> Something like:
> <Cfoutput>
> <input type="hidden" name="ReturnTo" value="#CGI.Script_Name#">
> </cfoutput>
>
> Hope that helps.
>
> Best regards,
> Zac Bedell
>
> > -----Original Message-----
> > From: Michael Slatoff [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 22, 2000 1:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: #cgi.http_referer# and IE
> >
> >
> > I have a form that sets a session.variable and then redirects to
> > the cgi.http_referer. It works fine in Netscape 4.74 but IE 5.5
> > doesn't like it.
> >
> > <cfoutput>
> > <cflocation url="#cgi.http_referer#">
> > </cfoutput>
> >
> > Does anyone know of a work around?
> >
> > Micahel
> >
> >
> > --------------------------------------------------------------
> > ----------------
> > Archives: http://www.mail-archive.com/[email protected]/
> > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
> > s/cf_talk or send a message to
> > [EMAIL PROTECTED] with 'unsubscribe' in the body.
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
> Comment: Please use PGP!!!
>
> iQA/AwUBOaLBograVoMWBwRBEQKtwwCgtTquo/XztW4ixxE5vetvXeaNF5IAnj8A
> dugk9Y5uMn9YLwibP3hoYVJD
> =z0tu
> -----END PGP SIGNATURE-----
> --------------------------------------------------------------------------
--
> --
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.