Errmm..is there anyway to put that code to remove the toolbar and stuff
at the top of every page? 

So that when the page loads, it will remove the toolbar if it's there?
:)

Because this will work if they need to click a link to get to another
window. 
But what if they can just enter a URL or something like that.

-Gel


-----Original Message-----
From: Todd [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 21, 2001 1:28 PM
To: CF-Community
Subject: Re: Disable Back Button in Browser.


I had that problem with an online test application that I just built.  I
ended up "disabling" keyboard presses, disabling all mouse buttons
except for the left one, and opening the test in a new window without
the tool bar at the top (so no back button).  Of course, there are ways
to get around this stuff, but 90% of the people out there don't know
about them.  In your case, if you did something like that, they would
use your navigation thing because it would be easier than trying to find
a way around all the other stuff you put in. :)

JavaScript to disable mouse buttons and make annoying popups for key
presses (if you care about them).  It's a modified script that I got
from the tag gallery, but I forgot which one, so I can't give proper
credit, heh.

function secure() {
  alert("All keyboard commands have been disabled for the duration of
this test.");
  nextPage = new String(history.forward());
  if (nextPage == "undefined") {
   // Do nothing
  } else {
   location.href = history.forward();
  }
 }

 // This group of functions disable the right mouse button.
 var message="All non-essential mouse buttons have been disabled for the
duration of this test.";

 function click(e) {
  if (document.all) {
   if (event.button != 1) {
    alert(message);
    return false;
   }
  }
  if (document.layers) {
   if (e.which != 1) {
    alert(message);
    return false;
   }
  }
 }
 if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);
 }
 document.onmousedown=click;


Here is the code that gets rid of the tool bar and makes the browser go
full screen .. among other things.  You will have to modify it, I'm
sure.

function newWindow(varOTID) {
  varNewOTID = "./index.cfm/scd/preparetest/cid/" + varOTID + ".htm";

window.open(varNewOTID,null,"directories=no,fullscreen=yes,location=no,m
enub
ar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
 }


oh .. and put this in the <body> tag if you want to disable those key
presses

onkeydown="secure();"



If you have any questions, let me know :)

Todd

----- Original Message -----
From: "gel" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Friday, December 21, 2001 9:52 AM
Subject: Disable Back Button in Browser.


> *sigh*
> You know..you write an application, and take your time to check what 
> stage the user is at and all that good stuff.
>
> And then the users mess it all up by clicking the BACK button on the
browser
> instead of using  your nice navigation bar and stuff. Why? Hmm? Why?!
>
> So now I have to find a way to disable that damned BACK button. Is 
> there a way? I don't want them clicking BACK to go ...err...back to 
> previous
pages.
> They should click Cancel or what have you on whatever page theya re 
> on..or click Main Menu. whatever.
>
> I haven't been able to find a script to do this though, have any of 
> you?
>
> ALternately..should I just Fullscreen the browser whenever hte page 
> loads? Oh..and if that would work then how would I go about doing that

> ? Hee hee

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to