Groups | Blog | Home
all groups > asp.net building controls > july 2004 >

asp.net building controls : call javascript function after validation


Eirik Eldorsen
7/29/2004 1:27:22 PM
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?

--
Eirik Eldorsen

Lucas Tam
7/29/2004 2:18:37 PM
"Eirik Eldorsen" <NOoSPAAAMeirik@eldorsens.nettsider.no> wrote in
news:ekF617VdEHA.2504@TK2MSFTNGP12.phx.gbl:

[quoted text, click to view]

You'll need to redirect to a processing page, then continue processing
while displaying the animated gif.

--
Lucas Tam (REMOVEnntp@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Lucas Tam
7/29/2004 3:54:59 PM
"Eirik Eldorsen" <NOoSPAAAMeirik@eldorsens.nettsider.no> wrote in
news:#WqJHNYdEHA.1648@TK2MSFTNGP11.phx.gbl:

[quoted text, click to view]


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.

--
Lucas Tam (REMOVEnntp@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Eirik Eldorsen
7/29/2004 5:47:21 PM
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?


[quoted text, click to view]

Eirik Eldorsen
7/29/2004 6:02:46 PM
Thank you! I'll check it out

[quoted text, click to view]

AddThis Social Bookmark Button