50 users online (1 members and 49 guests)  


  Results 1 to 3 of 3

Related

  1. reload a page    Forum: Javascript Forum
    Replies: 8
  2. Manipulating browser history    Forum: Website Scripts Forum
    Replies: 2
  3. Replies: 2
  4. Replies: 5
  1. #1
    theBeachBum's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    4

    Reload last page in history

    Is there a way to reload the last page (back) and refresh it in the same click?

  2. #2
    theBeachBum's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    4

    Re: Reload last page in history

    hi all,any help here please, greatly appreciated.

  3. #3
    xmassey's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    100

    Re: Reload last page in history

    Hey,
    Just wondering what context you are using this task for.
    Surely it would be easier and more professional to direct the you begin from to the new page (which is the page you go to if clicked back), and then no refresh would be needed.
    Creating a javascript back button on its own is simple:
    <input type=button value="Back" onClick="history.go(-1)">
    And one for refreshing the page:
    document.write('<form><input type=button value="Refresh" onClick="history.go()"></form>')
    OKAY, so I am not a javascript expert, but surely you combine the 2. Therefore in the 2nd example, change history.go() to history.go(-1) and surely this will refresh the page that is back one...
    So...
    Code:
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    document.write('<form><input type=button value="Refresh" onClick="history.go(-1)"></form>')
    </SCRIPT>
    </head>
    I haven't tried it, but let me know if it works
    Chris
    Last edited by xmassey; 11-07-2007 at 01:46 PM.



Tags for this Thread