Calling javascript function

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Calling javascript function

Post 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
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Calling javascript function

Post 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.
John Turnbull
Thunderstone Software
Post Reply