By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,117 Members | 2,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,117 IT Pros & Developers. It's quick & easy.

IE problem with JavaScript, ActiveX

P: 1
I am having a problem with some simple Javascript code on a project im on. In internet explorer 7 some ActiveX controller blocks my code, is there any way around that? Is there something in my code that Internet explorer doesn't like?

The Javascript is supposed to rezise a main div, it works fine in most browsers but i would love to in some way get around that IE7 warning.

Here is the code (function size loaded by body onresize):

Expand|Select|Wrap|Line Numbers
  1. function size(){
  2.                 var offset = 140;
  4.                 if(window.innerHeight == null){ //IE
  5.                     var height = document.documentElement.offsetHeight - offset;
  6.                     height += "px";
  7.                     document.getElementById("main-cont").style.height = height;
  8.                 }
  9.                 else{ // Rest of the browsers
  10.                     var height = window.innerHeight - offset;
  11.                     height += "px";
  12.                     document.getElementById("main-cont").style.height = height;
  13.                 }
  15.             }
Jan 26 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Welcome to TSDN!

I think what you want is clientHeight. See this link.
Jan 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.