I am receiving a JavaScript error in IE7: you don't have permission
.
In IE8+, Chrome, Firefox, and Safari there is no problem with this code.
Why does this error only occur in IE7? And how would I change my code using JaScript and Ajax?
Code:
login: function () {
var a = location.href;
if (loginCurrentFullUrl != null && loginCurrentFullUrl != "") {
a = loginCurrentFullUrl;
}
var b = location.href.substring(location.href.length - 1);
if (b.indexOf("/") > -1) {
a = location.href.substring(0, location.href.length - 1);
}
location.href = "/pc/login/?url=" + encodeURIComponent(a);
},
or
var o = location.toString();
Error code: ('you don't have permission')
var a = location.href;
var o = location.toString();
I tried:
document.location.href;
window.location.href;
I also tried:
document.domain = 'mydomain.com';
Neither has worked.