Re: Focus in Netscape
by Robin Liston <rliston(at)home.com>
|
Date: |
Tue, 25 Sep 2001 18:46:49 -0700 |
To: |
hwg-languages(at)hwg.org |
In-Reply-To: |
|
|
todo: View
Thread,
Original
|
|
Thank to all those who responded, this works in Netscape 4.76/6 and IE
6
function thisFocus() { //sets focus of form
if(document.layers){
self.focus();document.layers['Main'].document.loginform.UserName.focus();
}
else {
self.focus();document.loginform.UserName.focus();
}
}
and in the Body tag:
onLoad="thisFocus();"
>>>>
<excerpt> This JavaScript snippet in the body tag works fine in IE and
Netscape 6,
but is causing an error in Netscape 4.76 (Win98)
onLoad="self.focus();document.loginform.UserName.focus();"
The form field is in a table, and the form itself is in a DIV.
Is this somehow causing the problem? Is there a work around?
</excerpt><<<<<<<<
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
10 years ago I had men fighting over me...
now they just fight with me.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA