PDA

View Full Version : upload new page when back button clicked


scriptblur
11-25-2002, 03:24 AM
Hi guys... can anyone please help.


i put something like this, but it can't work :

<script type="text/javascript">
<!--
if (history.forward() == true)
{
function()
}

window.onload=function()
{
setTimeout("window.open('../general/expiry_page.asp','_top')",0);
}

// -->
</script>


if the users click back button, a new page will upload to him instead of the previous page?? any other methods?

ACJavascript
11-25-2002, 01:32 PM
Mabye try something along the lines of one of these two scripts.

1. Based of yours (not sure if it will work lol:D)
_______
<script language="javascript">

function CheckHistory(){
if(history.foward == true){
window.open("../general/expiry_page.asp","newWindow")
}
}

window.onload=CheckHistory

</script>
_________

Mabye this one using onUnload in the body tag.

____________

<script language="javascript">

function History(){

window.open("../general/expiry_page.asp","newWindow")

}
</script>

<body onUnload="History()">
_______________

I will tell ya right now,, don't use the onUnload script to much, if ya do you will really get your visitorys angry.

Hope it works for ya :D:D