Email Prompt while waiting for mail() to return

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
josefv
Forum Newbie
Posts: 23
Joined: Wed Jan 17, 2007 11:17 am

Email Prompt while waiting for mail() to return

Post 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!!! :)
choppsta
Forum Contributor
Posts: 114
Joined: Thu Jul 03, 2003 11:11 am

Post by choppsta »

This can be achieved using AJAX. Google for it, and then look at the prototype and jquery Javascript libraries.
josefv
Forum Newbie
Posts: 23
Joined: Wed Jan 17, 2007 11:17 am

Post by josefv »

I'll have a look into AJAX, choppsta. Thanks for the hint.
Post Reply