SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    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.


  2. #2
    JavaScript Guru (Big Ego) Arielladog's Avatar
    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.

    aDog

  3. #3
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers

    Just what I was looking for!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •