If your url has variables like action=takeAction then adding checkurl() to the onload of the body tag of your page can change the style of the link that got your user there if its id happens to be (in this case) takeAction
It works like a:visited except its only the most recently clicked link.
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
function checkurl() {
var ref = gup('action').toLowerCase();
if (ref) {
var a = document.getElementById(ref);
if(a) {
YAHOO.util.Dom.setStyle(a,'color','#0065b3');
//use your favourite style changer here
}
}
}