Click to See Complete Forum and Search --> : A question of order


allan smith
05-17-2004, 06:30 AM
If I have the following link in the <head> area
<script src="tsrjscript.js" type="text/javascript">
</script>

And inside this .js file there is a function
window.onload {
...
}

plus inline code for execution during the .js load /parse phase
(that is code that is not a function)

plus the following statement in the appropriate part of the HTML document

<body onload="map_email_link ()">

what is the order of execution
I am expecting

a) Inline code
b) window.onload function
c) body onload function

Is this correct - if not what?

tobiwan
05-17-2004, 06:41 AM
99% of me says that u r right, the remaining 1% just doesn't know

Fang
05-17-2004, 08:00 AM
No. Do not have two onload events. It will not work in IE.
Have all functions and statements in one initilizing function that is called from onload.