Kind of developed a work around that suits my needs. IE was in fact not refreshing the width and height of the images when a new src was defined. However, the html which contained these values was intact. So, I simply created a function that searched for the string within the html (ie ‘width=”’ or ‘height=”’) and then parsed through the following characters to see when they were no longer a number.
For example: width=” would be followed by 40”
My function steps through the characters: 4 40 40”
As soon as it hits 40” it knows it has gone too far and returns the number from the previous step.
It isn’t the prettiest fix, but here is my solution:
The str is the whole string i am searching through
the attr is the attribute i am looking for (ie ‘width=”’)
NOTE : This really only works for numbers, but could be altered to return strings as well.
function(str,attr){
var startIndex = str.indexOf(attr) + attr.length;
var n = 0;
for (var i=1; i
var _sub = str.substring(startIndex,startIndex+i);
if (isNaN(_sub)) {
return Number(n);
}
n = _sub;
}
}

