call javascript function after validation

Discussion in 'ASP .Net Building Controls' started by Eirik Eldorsen, Jul 29, 2004.

  1. 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
     
    Eirik Eldorsen, Jul 29, 2004
    #1
    1. Advertising

  2. Eirik Eldorsen

    Lucas Tam Guest

    "Eirik Eldorsen" <> wrote in
    news::

    > 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.

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
     
    Lucas Tam, Jul 29, 2004
    #2
    1. Advertising

  3. 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?


    "Lucas Tam" <> wrote in message
    news:Xns953568E1B2CF2nntprogerscom@140.99.99.130...
    > You'll need to redirect to a processing page, then continue processing
    > while displaying the animated gif.
     
    Eirik Eldorsen, Jul 29, 2004
    #3
  4. Eirik Eldorsen

    Lucas Tam Guest

    "Eirik Eldorsen" <> wrote in
    news:#:

    > 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.

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
     
    Lucas Tam, Jul 29, 2004
    #4
  5. Eirik Eldorsen, Jul 29, 2004
    #5
    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. Eirik Eldorsen

    call javascript function after validation

    Eirik Eldorsen, Jul 29, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    815
    Eirik Eldorsen
    Jul 29, 2004
  2. schaf
    Replies:
    0
    Views:
    437
    schaf
    May 29, 2005
  3. mcdeveloper
    Replies:
    1
    Views:
    4,251
    mcdeveloper
    Jun 13, 2006
  4. Nick Chan
    Replies:
    2
    Views:
    390
    Nick Chan
    Sep 21, 2007
  5. grbgooglefan
    Replies:
    2
    Views:
    449
    Pascal Bourguignon
    Jan 30, 2008
Loading...

Share This Page