Another idea would be to put the three pages in your form onto one page as
hidden divs (except the first - that one should be visible).  Then provide a
way to move between the pages (next/back links that would hide/show the
appropriate divs).  And a Finish link/button that submitts the form.


Doing it this way will only put the main form on the history - hitting back
takes you to the page you were on before going to the form.


Another method is to make use of a hidden IFrame.  Submit your form into an
iframe.  Do whatever processing you need in the IFrame, then use _javascript_
to change the parent page with a
"window.parent.document.location.replace("page2.cfm");


Using the replace will prevent the back button from loading the first page
of the form.


There's always a way to work around the back button limitations...


Shawn

-----Original Message-----
From: Jeremy Brodie [mailto:[EMAIL PROTECTED]
Sent: Monday, February 09, 2004 8:33 AM
To: CF-Talk
Subject: Re:Page Cache..

"Caution: There is no true way of completely diabling the back button"

With the short answer out of the way, here's some _javascript_ that will make
it harder for folks to move backwards on your page.

Step one: Open the first page of the application in a new window. Use this
script as an example of preventing the back button from appearing in the
window

<script language="_javascript_"><!--
msgWindow=window.open('myPage.html','MyWindow','toolbar=no');
//--></script>

Step two: Disable the right clicker using this script from Dynamic Drive.
Please note that it only works in IE consistantly

<script language=_javascript_>
<!--

//Disable right mouse click Script
//By Maximus ([EMAIL PROTECTED]) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
<http://www.dynamicdrive.com>

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.> }
else if (document.all&&!document.getElementById){
document.> }

document. Function("alert(message);return false")

// -->
</script>

Jeremy Brodie
Edgewater Technology

web: http://www.edgewater.com <http://www.edgewater.com>
phone:(703) 815-2500
email: [EMAIL PROTECTED]

>Hi there:
>I'd like to avoid back button in the IE...I have a wizard with 3 pages..If
u
>click on the button Step 2 u are not allowed to go back to the page 1. I
>used CFcache tag with timestamp="0" but it  doesn't work......any idea?
>
>regards
>__
>MSc. Hassan Arteaga Rodríguez
>Microsoft Certified System Engineer.
>DIGI- Grupo de Desarrollo
>COPEXTEL, S.A.
>
>
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to