Hello, Anybody knows how to do that a loading image is being shown while the script is being processed? And when the script has finished loading a message will be displayed that process is completed. As I want to add that feature to my mailer. Thanks in advance!
You'll need to use jQuery (yes, you can use any javascript framework, etc). Have a div called "loading", and an image called "loading.gif". function send_message() { $("#loading").innerHTML = "<img src='loading.gif'>"; $.post(url, [data], function(){ $("#loading").innerHTML = ""; }); } HTML: That basically inserts an IMG tag into the div #loading, then does an AJAX post to 'url', and when it's done, clears #loading of the img tag. There are other ways to do this (and this example itself may need some tweaking), but this is how it's basically done.