Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > execute javascript functions in the page load event

Reply
Thread Tools

execute javascript functions in the page load event

 
 
Bernie V
Guest
Posts: n/a
 
      11-27-2003
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

--
http://www.djberniev.be


 
Reply With Quote
 
 
 
 
Bhaskardeep Khaund
Guest
Posts: n/a
 
      11-27-2003
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

 
Reply With Quote
 
 
 
 
anon
Guest
Posts: n/a
 
      11-28-2003
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.
>Like
>
>function1(){
> ....
>}
>function2(){
> ...
>}
>function3(){
> function1();
> function2();
>}
>
>then
>
><body onLoad="javascript:function3()">
>
>Hope this helps....
>
>Regards,
>Bhaskardeep Khaund
>

 
Reply With Quote
 
Bernie V
Guest
Posts: n/a
 
      11-29-2003
thx for the replies

I'll try it.

gr

Bernie V

--
http://www.djberniev.be
"Bernie V" <bernd.vantyghem@pandoradotbe> schreef in bericht
news:...
> 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
>
> --
> http://www.djberniev.be
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
firing button click event before page load event.....???? GauravGupta ASP .Net 4 01-19-2012 06:52 AM
Run Javascript function upon Page Load from Page Load event handle Matcon ASP .Net 3 05-28-2008 05:15 PM
Javascript event for Atlas page load Surya Vellanki ASP .Net 2 03-26-2007 11:28 PM
Page Load and webcontrol page load venky ASP .Net 5 07-11-2005 03:16 PM
please help me in distinguish redefining functions, overloading functions and overriding functions. Xiangliang Meng C++ 1 06-21-2004 03:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57