I’m sending post data using jquery, but when I retrieve it in asp all the spaces have been removed.
Classic ASP Request.Form removes spaces?
I found that question, but I’m not sure what he meant by url encode.
Here is my jquery:
var dataString = 'name='+$("#name").val()+'&email='+$("#email").val()+'¬e='+$("#note").val();
$.ajax({
type: "POST",
url: "asp_mail.asp",
data: dataString,
success: function() {
$("p#mail-prompt").html("The message was successfully sent.");
$("div#the-prompt").slideDown();
}
});
When you use a string as data, jQuery assumes that you have encoded the data correctly, but you haven’t encoded the values. Use an object instead, so that jQuery encodes the values: