Stimphy
asked on
Object resize issue
I have this activeX component that I render in an HTML page. My company exclusivly uses IE, 6 and 7. The activeX resizes properly if the height and width are set using javascript, or by setting the height/width to 100% on about 25% of the machines tested on. The other 75% do not size the control properly. If forced using the javascript included, I can double check the value after it is set and it reports the correct value however the object did not resize.
I had 2 PCs side by side double checking the security settings, they where both the same, the IE versions (7.0.5730.13) where identical as well, however one would properly resize and the other would not.
Also I have tried this on IE 6 browsers and it works on some machines, but others it simply will not resize properly.... I am lost.
Anyone know what may causing this odd behavior?
I had 2 PCs side by side double checking the security settings, they where both the same, the IE versions (7.0.5730.13) where identical as well, however one would properly resize and the other would not.
Also I have tried this on IE 6 browsers and it works on some machines, but others it simply will not resize properly.... I am lost.
Anyone know what may causing this odd behavior?
HTML Script
--------------------------------------------------------------------------------------------
<script type="text/javascript">
var wheight = 0;
var temp_height = 0;
var delay = 100;
function ResizeObject()
{
document.getElementById('iView').style.height=parseInt(temp_height)
if(parseInt(document.getElementById('iView').style.height)!=parseInt(temp_height))
{
document.getElementById('obHeight').innerHTML='Failed To Set!';
}
else
{
document.getElementById('obHeight').innerHTML='Value set!';
}
}
function init()
{
if(self.innerHeight)temp_height = self.innerHeight; //all except Explorer
else if(document.documentElement && document.documentElement.clientHeight)temp_height = document.documentElement.clientHeight; // Explorer 6 Strict Mode
else if(document.body)temp_height = document.body.clientHeight;// other Explorers
else temp_height = 430;
if(temp_height!=wheight)ResizeObject();
wheight = temp_height;
setTimeout('init()',delay);
document.getElementById('meHeight').innerHTML=temp_height;
}
window.onload = init;
</script>
---------------------------------------------------------------------
BODY
<label id=meHeight></label><br>
<label id=meWidth></label><br>
<label id=obHeight></label><br>
<label id=obWidth></label><br>
<object id="iView" classid="someobject" standby="Loading Image...">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please close
try {
call here
}
catch(e) { alert(e.message) }