Autopostback prgrammitically from client-side script

Discussion in 'ASP .Net' started by EC, Oct 15, 2004.

  1. EC

    EC Guest

    I have a web control button with which runs a client side script before it
    the autopostback using the onclick event. It is working fine when the user
    clicks it.

    What I would like to do is "click" this button programmtically from a client
    side script. Any ideas?

    Or is there a way to call the autopostback event of the button and still run
    the client side script?
     
    EC, Oct 15, 2004
    #1
    1. Advertising

  2. EC

    Sahil Malik Guest

    You can declare a server side script block and call that from the client.

    - Sahil Malik
    You can reach me thru my blog at
    http://www.dotnetjunkies.com/weblog/sahilmalik


    "EC" <> wrote in message
    news:%...
    > I have a web control button with which runs a client side script before it
    > the autopostback using the onclick event. It is working fine when the

    user
    > clicks it.
    >
    > What I would like to do is "click" this button programmtically from a

    client
    > side script. Any ideas?
    >
    > Or is there a way to call the autopostback event of the button and still

    run
    > the client side script?
    >
    >
     
    Sahil Malik, Oct 15, 2004
    #2
    1. Advertising

  3. EC

    bruce barker Guest

    <script>
    document.getElementById('buttonID').click();
    </script>

    -- bruce (sqlwork.com)

    "EC" <> wrote in message
    news:%...
    > I have a web control button with which runs a client side script before it
    > the autopostback using the onclick event. It is working fine when the

    user
    > clicks it.
    >
    > What I would like to do is "click" this button programmtically from a

    client
    > side script. Any ideas?
    >
    > Or is there a way to call the autopostback event of the button and still

    run
    > the client side script?
    >
    >
     
    bruce barker, Oct 15, 2004
    #3
  4. EC

    Eddie Clark Guest

    That was it. Thanks!


    "bruce barker" <> wrote in message
    news:%...
    > <script>
    > document.getElementById('buttonID').click();
    > </script>
    >
    > -- bruce (sqlwork.com)
    >
    > "EC" <> wrote in message
    > news:%...
    >> I have a web control button with which runs a client side script before
    >> it
    >> the autopostback using the onclick event. It is working fine when the

    > user
    >> clicks it.
    >>
    >> What I would like to do is "click" this button programmtically from a

    > client
    >> side script. Any ideas?
    >>
    >> Or is there a way to call the autopostback event of the button and still

    > run
    >> the client side script?
    >>
    >>

    >
    >
     
    Eddie Clark, Oct 16, 2004
    #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. Shawn Mehaffie
    Replies:
    4
    Views:
    697
    Shawn Mehaffie
    Jan 22, 2004
  2. Magnus Blomberg
    Replies:
    3
    Views:
    745
    Magnus Blomberg
    Apr 14, 2005
  3. Boss302
    Replies:
    0
    Views:
    1,102
    Boss302
    Nov 21, 2006
  4. Bogdan
    Replies:
    2
    Views:
    686
    Bogdan
    Jun 9, 2008
  5. Zoe Hart
    Replies:
    1
    Views:
    401
    Scott Wisniewski
    Jan 8, 2004
Loading...

Share This Page