execute javascript functions in the page load event

Discussion in 'ASP .Net' started by Bernie V, Nov 27, 2003.

  1. Bernie V

    Bernie V Guest

    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
     
    Bernie V, Nov 27, 2003
    #1
    1. Advertising

  2. 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
     
    Bhaskardeep Khaund, Nov 27, 2003
    #2
    1. Advertising

  3. Bernie V

    anon Guest

    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
    >
     
    anon, Nov 28, 2003
    #3
  4. Bernie V

    Bernie V Guest

    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
    >
    >
     
    Bernie V, Nov 29, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. venky

    Page Load and webcontrol page load

    venky, Jul 6, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    3,108
    venky
    Jul 11, 2005
  2. Xiangliang Meng
    Replies:
    1
    Views:
    1,607
    Victor Bazarov
    Jun 21, 2004
  3. Surya Vellanki

    Javascript event for Atlas page load

    Surya Vellanki, Mar 26, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    380
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 27, 2007
  4. GauravGupta
    Replies:
    4
    Views:
    2,109
    Shilpa1234
    Jan 19, 2012
  5. Matcon
    Replies:
    3
    Views:
    21,582
    Matcon
    May 28, 2008
Loading...

Share This Page