I try to make this cross browser expression and I get the following error:
$.ajax({ type: 'POST', url: "http://ourdevtest.com/foo/foo", contentType: "application/x-www-form-urlencoded; charset=utf-8", data: form.serialize(), success:function(result, textStatus, xhr) { form.hide(); console.log('success in preview form'); console.log("result: " + JSON.stringify(result)); console.log("textStatus: " + textStatus); console.log("xhr: " + JSON.stringify(xhr)); app.showThankYou(); }, dataType: 'json' }); }); },
Returns a console error: POST http: //% E2% 80% 8B /% E2% 80% 8B /% E2% 80% 8Buser:% E2% 80% 8Bpassword@ourdevtest.com /% E2% 80% 8Bfoo /% E2 % 80% 8B1 /% E2% 80% 8Bfoo /% E2% 80% 8B
It cannot load this url, but I do not know how to stop it from adding strange characters.
If you decode this error response, you have this line: http: //// user: password@ourdevtest.com / foo / 1 / foo /
, , istead form.serialize(), .
contentType: "application/x-www-form-urlencoded; charset=utf-8",
ajax
success:function(result, textStatus, xhr) { alert("result: " + JSON.stringify(result)); }