01-30-2009, 01:59 AM
The only way is to have js there before even loading page. Look at the top keyword.
01-30-2009, 08:34 AM
if the script tag is in the head tag, it will be loaded before the page.
anything that happens in the body of the script will be executed.
01-30-2009, 11:34 AM
not true for ie6 iframe, first loads HTML, then js, despite js is in the head,
possibly this is allso true disregarding iframe.