is there any call before 'body onload'?

A

Ask Josephsen

Hi NG

Is it possible to make a javascript call before "<body onload='...'>"?

What I'm doing is a preview of numerous images in an iframe and I want to
resize the iframe to match each picture. Normally I'd use the 'onload' (on
the src-page holding the image in the iframe) attrubute, but it's not called
until the picture has finished loading. I'd like to resize the iframe before
(or at the same time) the image starts loading.

Any ideas??


Med Venlig Hilsen

Ask Josephsen
 
E

Evertjan.

Ask Josephsen wrote on 30 aug 2004 in comp.lang.javascript:
Is it possible to make a javascript call before "<body onload='...'>"?

<script>alert(0)</script>
<body onload="alert(2)">
<script>alert(1)</script>

Elementary, my dear Ask?
 

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,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top