execute client code when form submitted

  • Thread starter Thread starter sklett
  • Start date Start date
S

sklett

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
 
If you are using ASP.NET 2.0, Button control has a OnClientClick attribute
to run client-side scripts.

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
 

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

Back
Top