execute client code when form submitted

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
 
S

Siva M

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top