tags:

views:

53

answers:

3

I'm just looking for a form that someone will put in their email and submit and that's it. They stay on the same page with ajax, and I get emailed the submission. I don't need to save it in a database. I would like to perform basic check to validate that there is a "2" and a "." in the address and there will be text put in a div saying "your email was sent". but that is all.

Anyone seen anything like that? I saw a few, but they all just input the info to a database.

I'm using jquery.

Thanks! Joel

A: 

Just use the jQuery ajax form submission methods and handle the email sending in a server-side script.

You can not send emails directly from JavaScript. You will have to submit the form to your own or a third-party server to get the email sent out. Also note that AJAX won't work with third-party servers due to cross-domain security restriction but you achieve same effect by using and iframe to submit the form.

Tahir Akhtar
+1  A: 

try this out http://trevordavis.net/blog/tutorial/ajax-forms-with-jquery/

zapping
This tutorial worked great. Thanks!
Joel
A: 

You have your answer here http://stackoverflow.com/questions/1328723/how-to-generate-simple-pop-up-using-jquery

Ravia
I don't want a popup-I want a form field.
Joel