call javascript function after validation

  • Thread starter Thread starter Eirik Eldorsen
  • Start date Start date
E

Eirik Eldorsen

When the user clicks a button on my page, a server side operation starts
which takes several seconds to complete.
To make the user less impatient I want to show a animating gif when he/she
clicks the button. I've been able to do this by calling a function by using
the onclick event of the button. My problem is that the function is always
called. I only want it to be called if page validation returns true. Is this
possible?
 
I only want it to be called if page validation returns true. Is this
possible?

You'll need to redirect to a processing page, then continue processing
while displaying the animated gif.
 
I was considering that solution, but I don't know how to autmatically start
the processing code. I can't put it in the Page_Load method. Can I put the
processing code in a thread, that I start in Page_Load?
 
I was considering that solution, but I don't know how to autmatically
start the processing code. I can't put it in the Page_Load method. Can
I put the processing code in a thread, that I start in Page_Load?


Check this article:

http://www.informit.com/articles/article.asp?p=174363&f1=nl;-158095;2004-
07-19

You can also use the same page as the form entry page, but just turn off
all the controls and display the "please wait page". That way you don't
need to redirect.
 
Back
Top