My code is running on jquery mobile 1.4.5. When i submit the form. The website will make a call to login.php and if it succeeds it will redirect to the #customer anchor. If not it will redirect to the #error popout. The problem is that this works as expected on chrome and firefox however it does not work on desktop IE11.
$(document).ready(function() {
$('#loginform').submit(function(e) {
e.preventDefault();
$.ajax({
type: "POST",
url: 'login.php',
data: $(this).serialize(),
success: function(data) {
if (data === 'login') {
window.location = '#customer';
} else {
window.location = '#error';
}
}
});
});
});
<form id="loginform" method="post">
<div class="ui-field-contain">
<label for="storeID">Store ID:</label>
<input type="text" name="usn" id="usn">
<label for="password">Password:</label>
<input type="password" name="upw" id="upw">
</div>
<input type="submit" Value="Login" />
</form>
</div>