Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2003
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Back button and Refresh

    Hi All...

    Does anyone know any script to take the visitor back to the previous page, after that refreshing that page??

    Thanx

    Curtis

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    Kansas City, Kansas
    Posts
    1,518
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Well here's the code for going back a page.


    Code:
    <input type="button" value="Back" onclick="history.go(-1); return false;">

  • #3
    New Coder
    Join Date
    Oct 2003
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What about Refresh

    Dude...

    With all due appriciation, but you forgot to tell me how would I refresh that page??


    Thanx

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Do you mean you want to go back one page then refresh that page? You can't exactly do that, just go to that page again.

    <input type="button" value="Back & Refresh" onclick="if (document.referrer) location.href=document.referrer">

    Take note that document.referrer does not work if the page is run offline. You must run it online (intranet or internet)
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Location
    Kansas City, Kansas
    Posts
    1,518
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Sorry, i didn't know how to do the refresh so i gave you what i know.


  •  

    Posting Permissions

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