Closed Thread Icon

Topic awaiting preservation: get rid of rectangle outline (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=8392" title="Pages that link to Topic awaiting preservation: get rid of rectangle outline (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: get rid of rectangle outline <span class="small">(Page 1 of 1)</span>\

 
slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 11-16-2002 16:41

you know the dotted rectangle that shows up around a link when you click it (to show that it's active). Is there a javascript / html code that will prevent that from happening?

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 11-16-2002 16:46

onfocus="this.blur()"

aaaahhhhh

Jason

edit: no way, did I just answer a question in the js forum? I think I did (but made a typo )

[This message has been edited by JKMabry (edited 11-16-2002).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-16-2002 16:56

How do I get rid of that rectangle when I click on a link?

___________________
Emps

FAQs: Emperor

slim___shady
Nervous Wreck (II) Inmate

From: canada
Insane since: Aug 2002

posted posted 11-16-2002 17:04

thanx a lot. why didn't it occur to me.

Fungii
Neurotic (0) Inmate
Newly admitted

From: Calgary, Alberta, Canada
Insane since: Nov 2002

posted posted 11-16-2002 20:37

Is it possible to implement this using CSS?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-16-2002 20:55

Afraid not. I don't think so, at least.

By the way, onfocus="this.blur()" is a bad practice, because it makes the page unnavigatable without a mouse. Some people like to use their keyboard to navigate around a page, and when they tab to a link, and that bit of code is executed, their next tab will go to the first link in the page. Not very intuitive. Keyboard users *need* the little outline.

A better solution, therefore is to use onmouseup="this.blur()" since mouseup can only happen with a mouse. The outline is there while the mouse button is down, but this solution is still better since it doesn't make the page more difficult to use for some people.

Fungii
Neurotic (0) Inmate
Newly admitted

From: Calgary, Alberta, Canada
Insane since: Nov 2002

posted posted 11-16-2002 21:04

Thanks for the reply, Slime. Guess I'll skip doing this as I'm not going to do a [onmouseup="this.blur()" ] for every link!

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-16-2002 21:08

Well, you can always run this piece of code after the page loads:

var alllinks = document.getElementsByTagName('a');
for (var a=0; a < alllinks.length; a++)
alllinks[a].onmouseup = function() {this.blur();};

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 11-16-2002 22:12
quote:
Is it possible to implement this using CSS?


It will probably be in CSS3 which is under development. Mozilla supports it already:

code:
-moz-outline: none;



« BackwardsOnwards »

Show Forum Drop Down Menu