Suppress link border (dotted...) on clicking the link

admin

Administrator
Staff member
Hi,<br />
Is there any way to suppress the dotted box...arround the linked ref. on clicking the a link (<a href=http://www.htmlforums.com/archive/index.php/...></a>)<br />
<br />
Thanx in advance,<br />
Hema<!--content-->Are you talking about when you click the back button? the dotten box around the link? If so yes... A friend of mine did something like that... I will grab that little code and post it... Be back in 5<br />
<br />
:)<!--content-->I just cut and past exactally what he had said:<br />
<br />
<br />
You ever get annoyed by the annoying dotted lines that appear around links when clicked? Heres a quick fix:<br />
<br />
<br />
<script language="JavaScript"><br />
function unblur() {<br />
this.blur();<br />
}<br />
function blurLinks() {<br />
if (!document.getElementById) return;<br />
theLinks = document.getElementsByTagName("a");<br />
for(i=0; i<theLinks.length; i++) {<br />
theLinks.onfocus = unblur;<br />
}<br />
}<br />
</script><br />
<br />
<br />
And ADD onLoad=" blurLinks()" to the body tag. Thats it, no more pesky lines in ie or ns6. <br />
<br />
You can also add the following javascript in every link <a> tag on your page: onFocus="if(this.blur)this.blur()"<br />
<br />
Now you can prettytizes your pages even more!!<!--content-->hmmmn.... ky, did you test out that code? It didn./t do anything for me. I also see that since its using getElementById its an IE only solution.<br />
<br />
This seemed to work fine in IE and N4.7 for me:<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onClick="document.body.focus()">sdjfslkf</a><!--content-->Originally posted by Dr. Web <br />
hmmmn.... ky, did you test out that code? It didn./t do anything for me. I also see that since its using getElementById its an IE only solution.<br />
<br />
This seemed to work fine in IE and N4.7 for me:<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onClick="document.body.focus()">sdjfslkf</a> <br />
<br />
No, I sure didn't test it, I have never been bothered about the dotted line myself. Actually I just cut and paste exacally what he had said on another site, with his approval.<br />
<br />
On the site that I got it from, no one seemed to impress with his idea, I don't know if he took it from somewhere, or anything, I just remembered it and thought I would post it here for a possible solution.<!--content-->this is all you need to fix the problem<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"link.html"><img src="button.gif" Width=xx height=xx border=0 onclick="this.blur()"></a> <br />
<br />
not 20 lines of code.<!--content-->your idea works great scoutt. Just be careful using it inside popups... sometimes it will blur the window.<!--content-->thanks Doc I will keep that in mind.<!--content-->Thanx, onFocus=this.blur() worked out<br />
<br />
Hema<!--content-->
 
Back
Top