SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2000
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need to know how you can find out the last page visited by a browser for purposes of a back button on a page that always take syou to the last page you were at. (FOr when a web site links to a page from different places, need the page to return to right page.)

  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try the following in a script:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    history.back();
    [/code]

    or

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    history.back(-1)
    [/code]

    i can't remember why you need the -1 (if you do) but i'm sure them is some reason for it.

    ------------------
    Karl Austin
    KDA Web Services

  3. #3
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Or more completely,

    &lt;A HREF="javascript:history.back()"&gt;...&lt;/A&gt;


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!


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
  •