View Full Version : AJAX POST method problem.....HELP!

12-03-2009, 05:29 AM
Dear forum guys,
I'm having a problem regarding the POST method with Ajax.
I'm sending form inputs through Ajax by POST method to an ASP file to add them back to a database.
However, what i noticed is that whenever i send the inputs of the form let's say ("username") through Ajax by the POST method, the result is the input "username" however with no spaces.
Why is it that the Ajax POST method ignores the spaces and sends the inputs without the spaces?
I tried it with the GET method and found out that GET doesn't ignore the spaces, it worked. But the application that i'm trying to build requires sending bigger data that the GET method can't send. SO therefore i need the POST method but i ran into the problem of Spaces Being Ignored.

Please, is there a way to send any string that contains spaces through AJAX POST method and not ignore the spaces in the output???

Thank You

12-03-2009, 12:33 PM
try encodeURI():

var foo="my test";