Re: remembering where the user is on the page??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rod Clay wrote:
I'm creating a website in php and I've noticed that many websites seem to "remember where the user is on the page," so that, for example, the user can click on a link and go to another page, but, when the user comes back to the original page, it is displayed so that the user is looking at the same part of the page that s/he was looking at when s/he clicked the link. This is a mystery to me! How do you create a webpage so that it "remembers" where the user is on the page and takes her/him back to that same place on the page when the user returns? There must be some "trick" to making this happen because a lot of pages do it and a lot don't (like mine! :-( ). But I'd like to make mine do it too!!

Thanks for any light you can shed for me on this "mystery."


You are probably referring to <a name=""></a> tag placement.

If in your web page you place an anchor tag like this:

<a name="SomeName"></a>

Then in the URL you add this to the end #SomeName it will try and place that position at the top of your viewable area in your web browser.

http://example.com/myfunpage.html#SomeName

If the page is really long this works just fine most of the time.

Hope this is what you are looking for...  :)


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux