Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-15-2005, 04:32 PM   PM User | #1
Lunatech3d
New to the CF scene

 
Join Date: Oct 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Lunatech3d is an unknown quantity at this point
Question: XMLHttp object and how to set a link to :visited

I've created a message board system, and I am using the XMLHttp object to load messages behind the scenes for browsers that support it.

Right now the process is:
1- User clicks on a message link
2- XML object calls getmessage.html which returns the message data
3- A DIV shows the message data through innerHTML.

The problem is, when the user clicks on the link, the browser doesn't consider the link as "visited" even though the "HREF" value of the hyperlink is the same page that the XML object is calling.

Is it possible to tell the browser that I have "visited" a link? I know it's a long shot because of security issues, but I am hoping that someone may have had a similar problem.

Just to re-iterate. I am not looking for alternative solutions. I want to know if this solution is possible.

Thanks!
Lunatech3d is offline   Reply With Quote
Old 04-15-2005, 11:34 PM   PM User | #2
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
No it's not .. but it depends on the application how you re-create that. If you've already considered non-script browser elsewhere, such that there's no need for the <a> to have redundent noscript behavior, then you can replace the href and onlick with a single javascript: URI - such as href="javascript:someFunction(args)"

If the contents are different for each link, even if only by an otherwise-irrelevant change in argument value, then the link should show as visited once it's been clicked.
__________________
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark
brothercake is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:13 PM.


Advertisement
Log in to turn off these ads.