I’ve tried this two ways.
Way 1
function Login() {
var email = encodeURIComponent($("#loginemail").val());
var pass = encodeURIComponent($("#password").val());
$.ajax({
url:"/user/login",
type: "POST",
data: {email:email, password:pass},
dataType: "json"
}).done(LoginDone);
//$.post("/user/login", {email:email, password:pass}, LoginDone);
}
Way 2
function Login() {
var email = encodeURIComponent($("#loginemail").val());
var pass = encodeURIComponent($("#password").val());
$.post("/user/login", {email:email, password:pass}, LoginDone);
}
Both ways work fine on chrome, but for some reason with IE it doesn’t send the data {email:email, password:pass} in the POST, or at all.
I’ve tried both on a local server, and on a live webserver, both with the same results.
Using IE10 here.
should be
You are passing the value of the variables as the key so if your server-side resource is expecting
emailit is actually seeing the value of that variableencodeURIComponent($("#loginemail").val()).This is likely not an IE10 issue, this shouldn’t work as written in any browser.
Update
This answer may no longer be applicable due to bug fixes in IE 10.
Please disregard this answer it is wrong and cannot be deleted due to being accepted.