G
~greg
I have links on an index page like this:
<a href="link" onclick="DoOnClick('link')"> page title </a>
-where the DoOnClick("link")
just adds a query part to the url before executing:
location.href = "link?query";
( this is done in order to maintain certain state information
--(instead of using cookies.))
I also use something like this:
a.link { ...different... }
a.visited { ...colors... }
a.hover { ...for each of these... }
in a css file for the index pages,
in order to distinguish the already-visited page-links.
The problem is that it's not working right.
It works with JavaScript disabled,
But with JavaScript enabled, it's only the
first-clicked page link that gets marked as having
been visited. Subsequent pages don't get marked.
Apparently the full "link?query" is being put
in the browser history, - not "link".
And since "link?query" doesn't match exactly any "link"
on the page, --none of them get marked as having been visited.
( However, - the really odd thing, - is that it does work
-right -- in my local mirror of the site!
(--I'm using the latest IE browser.)
Anyway, my question is,
can anyone think of a way around this?
Perhaps by somehow using the JavaScript's "history" object
to force recording of "link" instead of, or in addition to, "link?query",
in the user's visited-link history, --so that they'll all get marked as such
on the index pages?
Thank you.
~Greg.
<a href="link" onclick="DoOnClick('link')"> page title </a>
-where the DoOnClick("link")
just adds a query part to the url before executing:
location.href = "link?query";
( this is done in order to maintain certain state information
--(instead of using cookies.))
I also use something like this:
a.link { ...different... }
a.visited { ...colors... }
a.hover { ...for each of these... }
in a css file for the index pages,
in order to distinguish the already-visited page-links.
The problem is that it's not working right.
It works with JavaScript disabled,
But with JavaScript enabled, it's only the
first-clicked page link that gets marked as having
been visited. Subsequent pages don't get marked.
Apparently the full "link?query" is being put
in the browser history, - not "link".
And since "link?query" doesn't match exactly any "link"
on the page, --none of them get marked as having been visited.
( However, - the really odd thing, - is that it does work
-right -- in my local mirror of the site!
(--I'm using the latest IE browser.)
Anyway, my question is,
can anyone think of a way around this?
Perhaps by somehow using the JavaScript's "history" object
to force recording of "link" instead of, or in addition to, "link?query",
in the user's visited-link history, --so that they'll all get marked as such
on the index pages?
Thank you.
~Greg.