other purpose.
there are some tech. to do this .
- You can use the location replace method when changing the location.
- You can load the new location into another window, and then close the old window:
- open in the next window:
- You can open a window without a toolbar and Disable backButton from Keyboard and
Rightclick - You can add code to the previous page to force the browser to go forwards again:
<script language="JavaScript">
<!--
if (document.images)
location.replace('http://www.xyz.com/login.html');
else
location.href = 'login.html';
//-->
</script>
In this case "replaces the current history location with the new location."
<script langauge="JavaScript">
<!--
function newWindow(Nameoffile,windowName)
{
msgWindow=window.open(fileName,windowName);
}
//-->
</script>
<a href="javascript:newWindow('welcome.html','window1')">Open Window</a>
<a href="login.aspx" target="_blank">New User Login </a>
So it will open login page in new window
<script language="JavaScript">
<!--
msgWindow=window.open('Login.aspx','windowName','toolbar=no');
//-->
</script>
<script language="JavaScript">
<!--
javascript:window.history.forward(1);
//-->
</script>
There is no direct way to catch the back button event, so you have to play with javascipt to do so.
happy coding ........
no code is running properly in mozilla but they r working in IE
ReplyDeletewhich error u r getting exactly on error console
ReplyDeleteTHIS IS Cool
ReplyDelete