Click to See Complete Forum and Search --> : turn off 'active link' bounding box in IE
berk3
03-02-2003, 11:08 AM
Does anyone know how to turn off the annoying box around links in Internet Explorer (and now Netscape 6)?
I have organically shaped buttons with image maps and the rectangles ruin the effect.
onClick = blur() turns it off but only after it comes on momentarily.
I want to eliminate it completely.
Scriptage
03-03-2003, 10:38 AM
<a href="#" id="dummy" onFocus=this.blur()></a>
<script>
var activeLink="";
function swapLink(theHREF){
activeLink=theHREF;
document.all["dummy"].focus();
}
function executeLink(theHREF){
location.href=theHREF
}
function alerter(){
alert("hey")
}
</script>
<a href="javascript:alerter()" id="link1" onMouseDown=swapLink(this.href) onMouseOut=swapLink("") onMouseUp=executeLink>alert</a>
<br />
<a href="test.html" id="link2" onMouseDown=swapLink(this.href) onMouseOut=swapLink("") onMouseUp=executeLink>page</a>
As you can see it works with normal links and js links. Basically when the user presses the mouse down on the link the href is cached and the focus is sent to a dummy link with no visible text. When the mouse is released the executeLink function is executed which executes the link.
Dave you said this couldn't be done...Perhaps you should remove the jsmaster comment on your description ;)
Regards
Carl
Scriptage
03-03-2003, 10:40 AM
ps there shouldnt be a sapce in between java & script in the first link
Scriptage
03-05-2003, 05:34 AM
Lol. Look Dave, it was a JOKE, do you not have a sense of humour. Why did you take offence at my comment?
I find it hard to believe that you found a simple joke like this offencive. After all you could see it was a joke by the wink at the end.
Are you just annoyed that someone came up with a solution that you said wasn't possible?
The subject was "turn off 'active link' bounding box in IE" I gave the solution.
Anyway I have no more time to waste on the matter.
Regards
Carl
Vladdy
03-05-2003, 07:09 AM
:D :D I'm surprized nobody brought up the accessibility problems that arize when a focus rectangle is defeated ;)
Scriptage
03-05-2003, 09:48 AM
Actually Dave the bounding box does not show if you hold the button down...try it.
Secondly I wasn't trying toinsult you and I'm not trying to hide behind jokes. If I wanted to insult you I would have done it up front. I never disputed for a second that you aren't a jsmaster, you are obviously very talented in what you do.
If I remember correctly, in the old forums we both tried to help people in the same post, and we had a bit of a joke about it (correct me if I'm mistaken). I presumed I could have a joke with you and not cause offence, apparently I was wrong.
As for the accessibility issues...we have been through this many a time on this forum. IF SOMEBODY ASKS FOR SOMETHING SPECIFICALLY, HELP THEM, DON'T TELL THEM THAT IT'S INAPPROPRIATE.
If you go into a shop and ask for a pair of fingerless gloves would you expect to be told you might get cold fingers?
Regrads
Carl