execute javascript functions in the page load event

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
 
B

Bhaskardeep Khaund

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
 
A

anon

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,293
Latest member
Hue Tran

Latest Threads

Top