Div onload event

M

mike

I have a div I'd like set up differently based on some url params.

<div
onload="do_something('mike');document.getElementById('header_home_link').focus();do_other_things('params');">
</div>

Of course the onload event is not getting tripped.

Anyevents that should fire off when the div is shown in the body of the
document?

Mike
 
M

Michael Winter

On 10/06/2005 22:26, mike wrote:

[snip]
Of course the onload event is not getting tripped.

The load event only targets the BODY, FRAMESET, and IMG elements (though
it is only defined for the first two).
Anyevents that should fire off when the div is shown in the body of the
document?

Include a SCRIPT element after the closing tag of the DIV element. Once
the browser has passed that far into the document, it will run the code.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top