SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Java script for timer
-
Jan 4, 2001, 12:56 #1
- Join Date
- Oct 2000
- Posts
- 430
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
I'm making up some forms for my site and was wondering if anyone knows some JS for this:-
When the form is submitted the user gets sent to a page which says "Thankyou for your submission..blah, blah, blah.....".
I would like this page to automatically change back to the page they came from prior to filling out the form after 3 seconds, rather than having to click out of it.
I believe this could be done using "javascript:history.go(-2);" (which takes them back the two pages I require), but I haven't got a clue on how to set this to occur after a period of 3 seconds.
Any help appreciated.
Cheers.
-
Jan 4, 2001, 15:18 #2
- Join Date
- Jul 1999
- Location
- SC, USA
- Posts
- 390
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
On that page, which I assume the person is sent to via a server-side language, you could use:
<body onload="setTimeout('history.go(-2)',3000)">
What that does is it performs history.go(-2) after 3000 milliseconds.
aDogModerator at www.javascriptcity.com/forums/
-
Jan 5, 2001, 12:34 #3
- Join Date
- Oct 2000
- Posts
- 430
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Cheers
Just what I was looking for!!
Bookmarks