I have a url that gives me various parameters I need. I’ve managed to get the results, but for some reason it doesn’t show any results at all in IE and I’m not sure why. It works in every other browser, but just not IE. I’ve checked the console and there’s no errors at all.
This is what I’m using to get the results. The <head> section had this:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script>
<script src="js/users.js" type="text/javascript"></script>
<script type="text/javascript">
var imagesURL = localSt.iUrl();
function call(url, parameters, callback) {
var localTimeout = 10000;
$("#loader").show();
$.ajax({
type: 'POST',
url: url,
data: parameters,
timeout: localTimeout,
success: function(data) {
$("#loader").hide();
var obj = eval('(' + data + ')');
if (obj.ER) {
var header = "";
var msg = "Sorry there seems to be a communication error (" + obj.ER + ").<br/>Please log in again.";
//Error detail may be in PU
if (obj.ER == "103") {
header = obj.PU.HD;
msg = obj.PU.BD;
} else if (obj.ER == "1007") {
//authentcation failed
header = obj.PU.HD;
msg = obj.PU.BD;
}
$(this).attr("disabled", false);
showMessage(header, msg);
} else {
if (obj.PU) {
var msg = "";
var header = ""
if (obj.PU.HD) {
header = obj.PU.HD;
}
showMessage(header, obj.PU.BD, function() {
callback(data);
});
} else {
callback(data);
}
}
}
}
);
}
function loadtotals() {
call("https://my.domain.com/server/passkey.ashx", { JL: 0 },
function(data) {
var divIdentifier;
var obj = eval('(' + data + ')');
$.each(obj.JL, function() {
divIdentifier = "";
//keys: userID,currentID,lifetimeID,total
switch (this.userID) {
case 2:
divIdentifier = "#Jo";
break;
case 5:
divIdentifier = "#Fred";
break;
case 1000:
divIdentifier = "#Sue";
break;
case 1001:
divIdentifier = "#Chris";
break;
case 1002:
divIdentifier = "#John";
break;
}
if (this.userID >= 1000) {
switch (this.lifetimeID) {
case 4:
divIdentifier += "_0";
break;
case 5:
divIdentifier += "_2";
break;
case 7: case 9:
divIdentifier += "_3";
break;
}
}
if (this.userID == 1000) {
switch (this.currentID) {
case 0:
divIdentifier += "_1h";
break;
case 1:
divIdentifier += "_2h";
break;
case 2:
divIdentifier += "_3h";
break;
}
}
$(divIdentifier).html("£" + this.total);
});
}
);
}
function showApp() {
$("#loader").hide();
}
$(document).ready(function() {
if (navigator.userAgent.match(/Android/i)) {
$("body").addClass("android");
}
if (navigator.userAgent.indexOf("iPhone OS") > -1) {
if (navigator.userAgent.indexOf("Version/5.1") > -1) {
$("body").addClass("iphone4");
}
$("body").addClass("iphone");
}
$("a").click(function(event) {
event.preventDefault();
parent.$("#newuserID").val(0);
window.location = $(this).attr("href");
});
loadtotals();
showApp();
});
</script>
And within the <body> section I’m displaying the results by using this:
<div style="float: right; margin: 2px 149px 0 0;">
<script type="text/javascript">
document.write('<div id="Jo">');
</script>
<div id="Jo_0"></div>
<div id="Jo_2"></div>
<div id="Jo_3"></div>
</div>
<div class="clear"></div>
<script type="text/javascript">
document.write('<div id="Fred">');
</script>
<div id="Fred_0"></div>
<div id="Fred_1"></div>
<div id="Fred_2"></div>
</div>
<div class="clear"></div>
</div>
<div style="float: left; margin: 194px 0 0 185px;">
<script type="text/javascript">
document.write('<div id="Sue">');
</script>
<div id="Sue_0_1h"></div>
<div id="Sue_0_2h"></div>
<div id="Sue_0_3h"></div>
</div>
<script type="text/javascript">
document.write('<div id="Sue">');
</script>
<div id="Sue_1_1h"></div>
<div id="Sue_1_2h"></div>
<div id="Sue_1_3h"></div>
</div>
<script type="text/javascript">
document.write('<div id="Sue">');
</script>
<div id="Sue_3_1h"></div>
<div id="Sue_3_2h"></div>
<div id="Sue_3_3h"></div>
</div>
<div class="clear"></div>
</div>
</div>
<div style="height: 80px;">
<script type="text/javascript">
document.write('<div id="Chris_0">');
</script>
<div id="Chris"></div>
</div>
<div class="clear"></div>
<script type="text/javascript">
document.write('<div id="John_0">');
</script>
<div id="John"></div>
</div>
<div class="clear"></div></div>
I’d be really grateful for any help with this as I’ve tried everything to get it sorted, but no matter what I do it just won’t work in IE