Hello,

How can I insert an image once the user clicks the submit button in a form?

The process behind the form action takes 2-3 minutes and I want to display an image of a clock while it's processing so that the user knows that it's taking time to process the request.

Thanks!!

    Just qurious,why does the form take so much time to finish the process ?

      it interacts with 3 different web services that are in different web servers.

        Oh,I see.
        I'm sorry but the only thing I can think of is popups which don't seem to be what you're looking for so we(I'm also interested in learing how to do that 😛) have to wait for someone with more experience to reply.

          You want all this to happen before the response comes back from the server (that's two or three minutes away, after all). Since PHP runs on the server, it's not going to be available; so you're going to have to do it on the client, using JavaScript. Have the loading image in a hidden <div>, and display it when the form submits.

          Later on, if you want to get really fancy, you can add a periodic Ajax update that queries the server to see how things are getting on and provide feedback on progress.

          Since this is a clientside issue, I'm moving it to the clientside forum.

            Write a Reply...