Page 1 of 1

Email Prompt while waiting for mail() to return

Posted: Wed Feb 07, 2007 7:11 am
by josefv
My email script is working perfectly, and I want to take it a step further.

How do I get my script to display a nice little animated gif with a message saying:

"Please wait while we attempt to send your email."

while waiting for the mail() function to return, which will then of course report whether the message was sent or not.

I have one two reasons I want to do this:
1. To inform the user
2. To prevent the user from clicking the Submit button eighty times.

Thanks!!! :)

Posted: Wed Feb 07, 2007 7:39 am
by choppsta
This can be achieved using AJAX. Google for it, and then look at the prototype and jquery Javascript libraries.

Posted: Thu Feb 08, 2007 12:23 am
by josefv
I'll have a look into AJAX, choppsta. Thanks for the hint.