Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable back button

Status
Not open for further replies.

allyeric

Programmer
Mar 14, 2000
104
CA
Hi - is there any way to disable the back button on the browser?  I am doing an online exam, and don't want the student to be able to go back to exam once its completed.  Any suggestions or websites with info on this is greatly appreciated.
 
There is no way of doing this in IE. In netscape you have to request special Browser privledges. Open the exam in a new window without a toolbar and capture right mouse button clicks. That should stop most of em. Also, you could use ASP and keep there screenname and test to see if they've already been to a page....<br><br><A HREF="mailto:jared@aauser.com">jared@aauser.com</A>
 
thanks jared -&nbsp;&nbsp;I did try to use ASP and a session variable, but did not make a difference - always allowed the page.&nbsp;&nbsp;But, I will try your suggestion with the new window.
 
ASP is only serverside tho, once you get the stuff downloaded, the clientside scripts cannot see any of the serverside stuff, what I normally like to do is to insert a onload= command by the ASP , so that the client side executes that function. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
thanks karl - but could you please explain a little more about this?
 
heres an example:<br><br><FONT FACE=monospace><br>&lt;%'&lt;!--Step 0 Authenication--&gt;%&gt;<br>&lt;BODY &lt;%if IsEmpty(Session(&quot;LogName&quot;)) and Request.Form(&quot;Command&quot;) &lt;&gt; &quot;LogName&quot; then%&gt; onload=&quot;Load_Up&quot; &lt;%end if%&gt; &gt;<br></font><br><br>if the user never loged on in my example, then it inserts onload=&quot;Load_Up&quot; right in the body tag<br>so what you get is <br>&lt;BODY onload=&quot;Load_Up&quot;&gt;<br><br>so when the user finally downloads the ASP, it see's that, and executes the function. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top