here i have implemented using frames.

main a1.html

<script language=JavaScript>
window.history.go(1);
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Page 1</title>
</head>
<body>
<a target="_self" href="index.html" >Click
</a>
</body>
</html>

the next index.html

<html>
<head>
<title>New Page 1</title>
</head>
<frameset rows="64,*">
    <frame name="banner" scrolling="no" noresize target="contents" src="top.html">
    <frameset cols="150,*">
        <frame name="contents" target="main" src="left.html">
        <frame name="main" src="right.html">
    </frameset>
    <noframes>
    <body>
    <p>This page uses frames, but your browser doesn't support them.</p>
    </body>
    </noframes>
</frameset>
</html>

3 frames pages.
top.html

<script>
function Sandeep(what) 
 {
    if(what)
    {
    //do the actual operation
    }
    else{
    window.history.forward(0);
    }
 }
 </script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>INDEX PAGE</title>
<base target="contents">
</head>
<body onunload=Sandeep(false)>
</body>
</html>

left.html

<script>
function Sandeep(what) 
 {
    if(what)
    {
    //do the actual operation
    }
    else{
window.history.forward(0);
    }
 }
 </script>
  <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
<base target="main">
</head>
<body onunload=Sandeep(false)> 
</body>
</html>


<script>
function Sandeep(what) 
 {
    if(what)
    {
    //do the actual operation
    }
    else{
window.history.forward(0);
    }
 }
 </script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 3</title>
</head>
<body onunload=Sandeep(false)>
  </body>
</html>

save all in one folder and RUn. a1.html REMEMBER U HAVE TO ENABLE ACTIONSCRIPT/SCRIPTS in Browse.
then click on CLICK and try .

SANDEEP FROM BANGLORE.

Edited 3 Years Ago by mike_2000_17: Fixed formatting

I absolutely HATE it when programmers use tricky programming to keep me from leaving their pages.

The way I browse is to Google what I am looking for, then check out each page on the list in turn. When someone keeps me from using my back button, then I lose the rest of my search.

This article has been dead for over six months. Start a new discussion instead.