Dave-
I tried to do something simular to this once. I don't cann't use the
history.length in this manner. You would have to ask for permission from
the user through Universal Browers Read privilege. This is a security
feature build into the browers.
----- Original Message -----
From: "Dave Justin" <daveonsax@y...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Thursday, October 24, 2002 5:35 PM
Subject: [javascript_howto] Can I know if the user just used the Back
button?
> Hello everyone:
>
> I'm looking for a way to tell if the user has just hit the back button on
> the browser. Unfortunately, it seems that the history.next value cannot
> be read in most cases, as it requires UniversalBrowserRead privilege.
>
> I'm not interested in obtaining the url of the user's pages in history.
> But I would like to know if my page is the foremost in the history. For
> example, I can tell how many pages are in the window's history with
> history.length. Supposing that value were, say, 10... is there a way to
> tell whether the current page is value 1, 5, or 10 (or perhaps that would
> be 0, 4, and 9) in that list?
>
> Many thanks,
> Dave
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
>