...

View Full Version : Netscape 7.x and onfocus() workaround?



tdellaringa
06-25-2004, 04:08 PM
Hi folks,

I have a colleague who has a nasty, messy page that uses lots of onfocus() and onblur() and select() methods. Sidestepping the issue of whether or not this is a good idea - I have to help him fix a problem. His script works everywhere but NS7.

In particular, the form elements will not receive focus when the onfocus() method is called. No errors or warnings are thrown in the javascript console at all. It works in NS6 (and IE6 etc). Since I generally avoid this type of thing I'm not aware of a workaround for this - is there one?

Thanks

Tom

adios
06-25-2004, 04:21 PM
It's a bug...an annoying one.




function whatever()
{
............
............
var fElement = document.the_form.the_element;
setTimeout(function(){fElement.focus();}, 50);
}

tdellaringa
06-25-2004, 04:30 PM
Ah, boy it felt like it was some kind of wierd timing issue and that's where I was sniffing around. Thanks a lot! Boy that is annoying.

Do you by chance have a link to a reference for this bug? I've been googling everything with no luck on this at all!

Thanks!

Tom

adios
06-25-2004, 04:38 PM
Not sure...but this (http://bugzilla.mozilla.org/show_bug.cgi?id=236791) is probably related. They've been working on this one forever.

Have you seen the 'caret turds' yet? :eek:

tdellaringa
06-25-2004, 04:41 PM
Ah, I think it is this one:

http://bugzilla.mozilla.org/show_bug.cgi?id=105129

Missed the caret turds one lol.

Tom

adios
06-25-2004, 04:47 PM
http://216.239.57.104/search?q=cache:LAsSkZ9AVqoJ:www.geocrawler.com/archives/3/124/1999/9/50/2638426/+mozilla+turds+caret&hl=en

Thanks for that link! :thumbsup:

tdellaringa
06-25-2004, 04:52 PM
LOL on the turds one. Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum