// include stuff here
<!-- Body of your html -->
Then dothis() is run before loading the rest of the file.
You can probably use the "RUNAT" Attribue As well.
For example:Hope this helps! :DCode:
I'm not so sure if the RUNAT will work, but don't take my word for that. I was under the impression that specifying RUNAT="server" is used for server-side scripting, such as ASP (although it is much more commonly used implicity as simple <% %> delimiters). However, just entering code in the head, below the title and before the style sheets will run code as soon as it is downloaded. Be careful, as this can cause errors! Hope I helped!
Firstly, don't put any functions in header if you want them to run when the page starts to load because functions only work when they are called by an event-handler.
If you want to use a function (in order to make it common to multiple pages) put the function in a seperate JS file, and then call the function from an inline-script inside the head of the document. Like thus ...
<!-- // hide from old browsers
window.load = yourFunction() ;
That should work just nicely ...
Cheers. Scot-Bot. )