Click here to Skip to main content
11,715,043 members (62,608 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript HTML Ajax , +
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 at 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/ at 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 at 5-Nov-12 4:35am
I am talking about sending 'email' via javascript .Not about sending 'request' via javascript
Ankur\m/ at 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 at 5-Nov-12 6:14am
See ? Where ????
n.podbielski at 5-Nov-12 6:37am
++ :)
Member 3892343 at 5-Nov-12 5:38am
So can be done? any tutorial or code?
n.podbielski at 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 at 5-Nov-12 6:43am
Member 3892343 at 5-Nov-12 8:05am
any tutorial with php?
ryanb31 at 5-Nov-12 9:00am
Use the .ajax() call in jQuery to call webservice on your server which actually sends the email.
Mathlab at 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
0 Sergey Alexandrovich Kryukov 530
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 115
0 Sergey Alexandrovich Kryukov 775
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320

Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 5 Nov 2012
Copyright © CodeProject, 1999-2015
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