<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>&gt;3. Could the html be so small that the 
javascript does not have time to download?&nbsp; The javascript is 
9kb.</FONT></DIV>
<DIV><FONT face=Arial size=2>&gt;4. How is a page loaded?&nbsp; ie starts with 
the html and as soon as external import is found, downloads the 
javascript?&nbsp; when the end html is found does all downloads 
stop?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Right,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>there are chances that ur javascript is not yet 
loaded when the HTML page call for the functions...</FONT></DIV>
<DIV><FONT face=Arial size=2>I dont mean not yet downloaded but when the HTML 
page is loading, the browser interpret HTML and create a DOM out of this. In the 
mean time, he is downloading the JS external file and when the file is 
dlowloaded or present in the cache, the browser is interpreting all functions in 
order to make them available by the page.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>For instance, when the BODY of your page is calling 
on onload event a function in ur external JS, it's possible the JS is already 
downloaded but the function does not exist yet&nbsp;for the 
browser.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>It's the same too when a JS function try to call an 
HTML object while the page is not fully loaded yet (check onreadystate event for 
this)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>A solution to this : when u call the first function 
and this function does not exist yet, just call instead a function which is a 
timeout checking if the other function exist. When the function exist, just call 
it and stop timeout.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thsi require of course the timeout function to be 
outside of the JS file...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Have a nice day</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>L. Goffin</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>