Forum Moderators: open

Message Too Old, No Replies

Avoiding the onLoad event, is it possible

         

stcrim

4:45 pm on Sep 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am working with a script that has an onload event. The sript is being called from a remote .JS. In most cases I will not have access to the <body tag> to set it for two onload events - so there will be some sites where the two onloads conflict.

Is there another way to to make this script work without the onload event? (see code below)

-s-

setTimeout('loopfunc()',delay_time);
}

if (ie¦¦ns4¦¦ns6)
window.onload=onad

Arem

12:48 pm on Sep 28, 2004 (gmt 0)

10+ Year Member



If I understand you correctly, I suppose there would be.

body.onload=new Function(body.onload+"onad");

Bernard Marx

5:04 pm on Sep 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IE: attachEvent
Standards: addEventListener

These element methods don't interfere with any previous event assignment.