Quote:
> The position of an script in a page matters? If I put my scripts in
<HEADER>
> or <BODY>, what happens?
The position does matter somewhat.
Originally, putting scripts inside the <head> (not <header> ;-) ) element
stopped the source code from being printed on the page if the browser didn't
understand the <script> tag.
Scripts are run as soon as they are downloaded, so if you rely on something
in the document to have already been created (like a <div> or an <input>)
then your code will have to appear after the element in the source code.
One way around this is to use the document.onload event handler, which will
run when everything on the page has loaded.
Peter
--
Peter J. Torr - Microsoft Windows Script Program Manager
Please do not e-mail me with questions - post them to this
newsgroup instead. Thankyou!