execute javascript functions in the page load event

  • Thread starter Thread starter Bernie V
  • Start date Start date
B

Bernie V

Hi group,

I have 2 js files where I have scrollfuntions.
Is it possible to execute the 2 funtions in the page load event ? What code
do i have to use to execute function1();function2() ?

At the moment I us the functions in the body onload tag but I have troubles
with it.

thx in advance,

Bernie V
 
Hi,

You can create a function, say function3(); and put the other two functions inside that. Then Put the function3() on the bodyonLoad event.
Like

function1(){
....
}
function2(){
...
}
function3(){
function1();
function2();
}

then

<body onLoad="javascript:function3()">

Hope this helps....

Regards,
Bhaskardeep Khaund
 
also checkout - Page.RegisterStartupScript
-----Original Message-----
Hi,

You can create a function, say function3(); and put the
other two functions inside that. Then Put the function3()
on the bodyonLoad event.
 
Back
Top