I get this syntax error on the eval line in this code when running IE. This works perfectly fine in both Chrome and Firefox, just not IE.
$(document).ready (function () {
$.ajax({
url: 'scripts/isLoggedIn.php',
success: function (tmp) {
data = eval ('('+tmp+')');
if (data.login=='OK') {
$('#main').load ('scripts/loginok.php');
$('#menu').show("slow");
}
}
});
});
Please help me understand this problem
Use the getJSON method that parses the data automatically: