Ok peep's here's the problem...
This is a simplified version of a file I'm writing...
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>_</title>
<script src="/sifu/query/jquery.js"></script>
<script>
/********************************************************/
str='abcdefghijklmnopqrstuvwxyz'
/********************************************************/
function pop(){
/****************************/
sx='for(ia in str)'+'\n';
for(ia in str)
sx+='\n'+ia+' => '+str[ia];
enX.innerText=sx;
/****************************/
sy='for(ib=0;ib<str.length;ib++)'+'\n';
for(ib=0;ib<str.length;ib++)
sy+='\n'+ib+' => '+str[ib];
enY.innerText=sy;
/****************************/
}
/********************************************************/
$(document).ready(function(){
pop()
})
/********************************************************/
</script>
</head>
<body>
<table style="width:100%;text-align:center">
<tr>
<td id="enX">enX</td>
<td id="enY">enY</td>
</tr>
</table>
</body>
</html>
Demo
str = 'abcdefghijklmnopqrstuvwxyz'
function pop() {
sx = 'for(ia in str)' + '\n';
for (ia in str) {
sx += '\n' + ia + ' => ' + str[ia];
}
enX.innerText = sx;
sy = 'for(ib=0;ib<str.length;ib++)' + '\n';
for (ib = 0; ib < str.length; ib++) {
sy += '\n' + ib + ' => ' + str[ib];
}
enY.innerText = sy;
}
$(document).ready(function() {
pop()
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table style="width:100%;text-align:center">
<tr>
<td id="enX">enX</td>
<td id="enY">enY</td>
</tr>
</table>
When I load it in chrome it works fine... I get two equal columns of 0-25|a-z.
Yet, when I Load it in IE,
Column X, only has the header
for(ia in str)
and contains no instances of the loop ie:0 => a
etc...
And
Column Y, contains both the header
for(ib=0;ib<str.length;ib++)
and 26 instances of# => undefined
, where#
is the loop number.
I'm sorry to ask such a simplistic question peep's but I've recently been teaching myself how to code a web page specifically for chrome, leaving IE behind, and it seems that in the time it's taken to learn how to code in chrome I've forgotten the fundamentals of coding in IE...