ajax - jQuery send string as POST parameters -
i want send string ajax post parameter.
the following code:
$.ajax({ type: "post", url: "http://nakolesah.ru/", data: 'foo=bar&ca$libri=no$libri', success: function(msg){ alert('wow'+msg); } });
is not working. why?
try this:
$.ajax({ type: 'post', // make sure respect same origin policy url: // http://en.wikipedia.org/wiki/same_origin_policy url: 'http://nakolesah.ru/', data: { 'foo': 'bar', 'ca$libri': 'no$libri' // <-- $ sign in parameter name seems unusual, avoid }, success: function(msg){ alert('wow' + msg); } });
Comments
Post a Comment