Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Object resize issue

Posted on 2009-04-10
3
204 Views
Last Modified: 2012-08-14
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?
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...">

Open in new window

0
Comment
Question by:Stimphy
  • 2
3 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24128159
try wrapping the suspicious calls in

try {
  call here
}
catch(e) { alert(e.message) }
0
 
LVL 3

Accepted Solution

by:
Stimphy earned 0 total points
ID: 25388099
I dropped the project, could not find a good solution.
0
 
LVL 3

Author Comment

by:Stimphy
ID: 25388106
Please close
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question