Created
November 28, 2012 20:01
-
-
Save sohel-rana/4163774 to your computer and use it in GitHub Desktop.
Encoding the input element so that it is sent properly to the server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var userEmail=encodeURIComponent($('#emailinput').val()); | |
| $.ajax({ | |
| url: 'ajax/sendEmail.php', | |
| data: { email: userEmail }, | |
| success: function(data) { | |
| alert('Email has been sent successfully!!!'); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment