W
whapts3
I'm putting together a rather dynamic page (AJAX/all-that-mess).
So... to go between different sorts of content on the page, I have it
set up something like this.
<a href="#10" onclick="loadFragment()"> ... </a>
<a href="#20" onclick="loadFragment()"> ... </a>
where loadFragment is a function which does something based on the #20
which is now appended to the document's .location.
This works fine for bookmarks and links (I have an onLoad handler that
checks the fragment as well) but does nothing for people who want to use
the Back button. Is there any way that I can get an explicit
notification when the document's location changes? Or should I try to
poll document.location for changes?
So... to go between different sorts of content on the page, I have it
set up something like this.
<a href="#10" onclick="loadFragment()"> ... </a>
<a href="#20" onclick="loadFragment()"> ... </a>
where loadFragment is a function which does something based on the #20
which is now appended to the document's .location.
This works fine for bookmarks and links (I have an onLoad handler that
checks the fragment as well) but does nothing for people who want to use
the Back button. Is there any way that I can get an explicit
notification when the document's location changes? Or should I try to
poll document.location for changes?