Forum Moderators: open

Message Too Old, No Replies

onload="blurLinks()"

Negates a:active

         

pageoneresults

4:42 pm on May 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Good morning! I am currently utilizing this piece of script in my external .js file to remove the dotted line around links...

function unblur() {
this.blur();
}

function blurLinks() {
if (!document.getElementById) return;
theLinks = document.getElementsByTagName("a");
for(i=0; i<theLinks.length; i++) {
theLinks[i].onfocus = unblur;
}
}

And then this in the <body> tag...

<body onload="preloadImages();blurLinks()">

The problem I'm having is that this piece of script negates the a:active rule for my links. Anyone know of a hack for this? I'd like to have my a:active function back!

joshie76

7:02 pm on May 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since only IE does this (I think) you can use the proprietary attribute hidefocus="true".

May stop your HTML validating but removes the need for scripts and your element will still be 'active' when it's 'active'.

Remember though - the dotted line is there to allow people to move around the page using keys (tab, shift tab etc), remove it and you remove this accessibility.

Josh