execute client code when form submitted

Discussion in 'ASP .Net' started by sklett, Oct 13, 2006.

  1. sklett

    sklett Guest

    I would like to show an animated gif and display a message while a form is
    being posted. I went to add an onclick handler to the button and realized
    there already was one for the postback. I still want my form to post like a
    regular asp.net form but I would like to execute some client script before
    it does. What is the "Best Practice" way to handle this? Any tips or
    suggestions will be appreciated.

    Thank you,
    Steve
     
    sklett, Oct 13, 2006
    #1
    1. Advertising

  2. sklett

    Siva M Guest

    If you are using ASP.NET 2.0, Button control has a OnClientClick attribute
    to run client-side scripts.

    "sklett" <> wrote in message
    news:...
    I would like to show an animated gif and display a message while a form is
    being posted. I went to add an onclick handler to the button and realized
    there already was one for the postback. I still want my form to post like a
    regular asp.net form but I would like to execute some client script before
    it does. What is the "Best Practice" way to handle this? Any tips or
    suggestions will be appreciated.

    Thank you,
    Steve
     
    Siva M, Oct 14, 2006
    #2
    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. Eric Shin

    Form submitted

    Eric Shin, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    494
    Martha[MSFT]
    Jan 12, 2004
  2. SWu
    Replies:
    0
    Views:
    601
  3. ben
    Replies:
    0
    Views:
    1,096
  4. Bogdan
    Replies:
    2
    Views:
    687
    Bogdan
    Jun 9, 2008
  5. Sudip
    Replies:
    0
    Views:
    223
    Sudip
    Jul 1, 2005
Loading...

Share This Page