Page 1 of 1

Calling javascript function

Posted: Fri Oct 26, 2012 7:26 pm
by barry.marcus
I know how to to call a javascript function from an event like an onclick of a botton. But is there a way to call a javascript function as the vortex for a page is loading, i.e., inline with the loading of the page.

For example:

<a name=myPage>

<verb noesc><script language=javascript>

JS function myFunction() definition is right here

</verb>

<form name=myForm>

<!-- Can I call myFunction() here as form loads? -->

rest of form code here

</form>
</a>

Thanks

Calling javascript function

Posted: Fri Oct 26, 2012 8:15 pm
by John
It's up to the browser when a JavaScript function is called. You can use <flush> to try and force the call to be sent to the browser, but I'm not sure how that would help.