By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,600 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,600 IT Pros & Developers. It's quick & easy.

Mozilla blur() problem

P: n/a
Please take a look at this page:

http://home.comcast.net/~delerious1/index10b.html

There is javascript code that is executed when the page is loaded. The code
calls the focus() method and then the blur() method on the first anchor in the
box. In IE and Opera the code works. But in Mozilla, you can see the dotted
line around the first anchor, so it's as if the blur() method is not working.

Anyone know what's going on?

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


de*******@no.spam.com wrote:
Please take a look at this page:

http://home.comcast.net/~delerious1/index10b.html

There is javascript code that is executed when the page is loaded. The code
calls the focus() method and then the blur() method on the first anchor in the
box. In IE and Opera the code works. But in Mozilla, you can see the dotted
line around the first anchor, so it's as if the blur() method is not working.


When I load the page with Netscape 7.1 then indeed there is a dotted
line around the first link, but when I hit enter on the keyboard the
link is not followed thus I think the blur() call works as far as
ensuring that the link doesn't have focus, only Mozilla seems to have a
bug to remove the dotted focus outline.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

P: n/a
On Sat, 20 Dec 2003 11:53:28 +0100, Martin Honnen <ma*******@yahoo.de> wrote:
When I load the page with Netscape 7.1 then indeed there is a dotted
line around the first link, but when I hit enter on the keyboard the
link is not followed thus I think the blur() call works as far as
ensuring that the link doesn't have focus, only Mozilla seems to have a
bug to remove the dotted focus outline.


Hmm, that's an interesting observation. I had thought that the blur() call
wasn't doing anything. I fixed this particular problem by making an
additional call to blur(), before the other calls. So instead of having:

element.focus();
element.blur();

I now have:

element.blur();
element.focus();
element.blur();

Now Mozilla doesn't have the dotted line anymore, and I had thought it was
because only the first call to blur() did anything while the subsequent calls
to focus() and blur() didn't do anything. But from what you say, that may not
be the case. Well, whatever, I have it working, that's all that matters. :-)

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.