Click here to Skip to main content
13,043,865 members (47,889 online)
Rate this:
Please Sign up or sign in to vote.
I need some help, I am creating a webpage and want to a 'contact' form of my webpage the user can leave a message but this message to forward to an email address, I want to use ajax so that the webpage won't reload to another and to display a success message, any tutorial, webpage link welcome.

Thank you

Don't want to mess with php if possible
Posted 4-Nov-12 21:51pm
aspnet_regiis -i 5-Nov-12 3:55am
You cannot send email via javascript , ajax or jQuery. You need to use server side logic to send email.
Ankur\m/ 5-Nov-12 4:04am
why not? send an ajax request using javascript/jQuery which will send mail to the passed address from the server.
aspnet_regiis -i 5-Nov-12 4:35am
I am talking about sending 'email' via javascript .Not about sending 'request' via javascript
Ankur\m/ 5-Nov-12 5:02am
And I am also talking about sending email using javascript/jQuery. It is very much possible and is done by sending an ajax request to server asking it to do so.
See how I used javascript to send email.
aspnet_regiis -i 5-Nov-12 6:14am
See ? Where ????
n.podbielski 5-Nov-12 6:37am
++ :)
Member 3892343 5-Nov-12 5:38am
So can be done? any tutorial or code?
n.podbielski 5-Nov-12 6:40am
It is not possible. HTTP is HTTP. SMTP is SMTP. Both work over TCP, that's all.
You have to mess with PHP or other server language.
aspnet_regiis -i 5-Nov-12 6:43am
Member 3892343 5-Nov-12 8:05am
any tutorial with php?
ryanb31 5-Nov-12 9:00am
Use the .ajax() call in jQuery to call webservice on your server which actually sends the email.
Mathlab 5-Nov-12 17:04pm
You can use an update panel for that, add your script manager and all the items to an update panel and you get refreshes with not flashing page

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 5 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100