Hi,
I am trying to move a layer when a page is loaded using onLoad=someFunction(). I need to put the function in the body of the document not the head, and this works fine in IE but not in Netscape 4. Does anyone know why?
Thanks.
Is it possible that someFunction() is IE specific, or might contain code to ignore NS? Very likely if you are working with DHTML, where the browsers employ quite different methods and attributes?
I already checked this, I know it works in Netscape because I added onClick=someFunction() to an image and on clicking the image the layer moves in both browsers.
Hmm. Another possiblity is that the onLoad event occurs before some element dimensions have been set for NS? I've seen some scripts to wait a couple of seconds to give the browser time to do additional work after the onLoad event has occured. Example:
Code:
function delayedFunction() {
setTimeout( "someFunction()", 2000 );
}
<body onLoad="delayedFunction()">
Not very likely, but might be worth checking? Cheers, NEIL
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.