Welcome to WebmasterWorld Guest from 184.73.8.127

Forum Moderators: open

Message Too Old, No Replies

JavaScript:history.go?

Is it possible to have it on a timer

   
4:51 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible to have the "go back" js on a timer where after a certain amount of time it goes back to the previous page?

<a href="JavaScript:history.go(-1)">

Any suggestions would be greatly appreciated!

-s-

5:00 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Perhaps this will do the trick:

<a href="JavaScript:setTimeout('history.go(-1)', 3000);"> 

/claus

5:04 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I am not sure that will work claus. The timer isn't fired unless you click the link, unless that is what you want stcrim? Just use the same code fired from what ever event you want. I would assume you would want it on the onload event like:

<body onLoad="goBack();">

With a the function goBack() in the code block:

<script>
function goBack(){
setTimeout('history.go(-1)', 3000);
}
</script>

5:29 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I will give'er a try...

Thank you very much!

-s-

5:40 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



korkus2000

That is perfect - works like a charm

-s-

5:54 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



claus' code, just different event :)

glad it worked.