473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

resize IE problem

16
Hi,
When clicking the menu on my page the whole page is shown. But then this fuction is called and suddenly everything below a certain point disappears! It works fine in FF. Does it have anything to do with document.documentElement.clientHeight?
Expand|Select|Wrap|Line Numbers
  1. var origWidth = document.documentElement.clientWidth;
  2. var origHeight = document.documentElement.clientHeight;
  3. var dropMenuVisible = false;
  4. function resizeHandler() {
  5.     if (ie4) {
  6.         var myWidth=0;
  7.         var myHeight=0;
  8.         var i;
  9.         var menues = getElementsByName_iefix("div", "undermeny");  //    getElementsByName doesn't work in IE
  10.         for (i=0; i < menues.length; i++) {
  11.             if (document.getElementById(menues[i].id).style.visibility == "visible") {
  12.                 dropMenuVisible = true;
  13.             }
  14.             else
  15.                 dropMenuVisible = false;
  16.             if ( typeof( window.innerWidth ) == 'number' ) {
  17.                 //Non-IE
  18.                 myWidth = window.innerWidth;
  19.                 myHeight = window.innerHeight;
  20.             } 
  21.             else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
  22.                 //IE 6+ in 'standards compliant mode'
  23.                 myWidth = document.documentElement.clientWidth;
  24.                 myHeight = document.documentElement.clientHeight;
  25.             } 
  26.             else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
  27.                 //IE 4 compatible
  28.                 myWidth = document.body.clientWidth;
  29.                 myHeight = document.body.clientHeight;
  30.             }
  31.             if (myWidth != origWidth || myHeight != origHeight) {
  32.                 // ie6
  33.                 origWidth = document.documentElement.clientWidth;
  34.                 origHeight = document.documentElement.clientHeight;
  35.             }
  36.             else {
  37.                 // ...statements to execute on a resize...
  38.     //        window.location.reload();  not necessary
  39.                 if (dropMenuVisible) {
  40.                     document.getElementById(menues[i].id).style.visibility = "hidden";
  41.                     document.getElementById(menues[i].id).style.visibility = "visible";  // In correct position
  42.                 }
  43.             }
  44.             // onResize=location.reload()
  45.         }
  46.     }
  47. }
  48.  
  49. window.onresize = resizeHandler;
  50.  
Sep 26 '07 #1
2 1612
Anette
16
Hi,

I found the solution. Of course not in that code... Had to do with another include file. include virtual not possible in php files.
Sep 26 '07 #2
gits
5,390 Expert Mod 4TB
hi ...

thanks for the information that you have found the solution ... post back to the forum anytime you have more questions ...

kind regards
Sep 26 '07 #3

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

Similar topics

2
by: Charles Packer | last post by:
From one of the online Javascript tutorials, I learned how to open a new window and set its size. I'm building a page that has several small photographs, and I want to let the viewer examine...
4
by: Peter Mrosek | last post by:
Hello, I have the following declaration in an header file (abbreviated version): typedef struct { unsigned char rgbBlue; unsigned char rgbGreen; unsigned char rgbRed; unsigned char...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
3
by: Z D | last post by:
Hello, BACKGROUND: ============== I've created a Windows User Control that contains an Image Control (among other controls). The user control handles the picture resize event. Whenever the...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
2
by: mrbrightsidestolemymoney | last post by:
Hi, I'm having a problem resizing a (very big) nested vector. It's not the most streamlined piece of code ever but I need this array to avoid having to recalculate the same quantity millions of...
8
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me...
11
by: Ajith Menon | last post by:
I have created a windows application in which the form needs to be resized on the MouseMove event. The windows resize function takes a lot of CPU cycles. And as the resize function is called on the...
1
by: | last post by:
I'm creating a user control where the size always needs to be divisible by three. In the resize event within the custom control I'm having no problem maintaining the height to be the same as the...
3
by: =?Utf-8?B?UiBSZXllcw==?= | last post by:
Hi! This discussion may help other programmers get a better idea of how to save uploaded images through a website. Why? Well currently, I save 3 versions of every uploaded image on my own...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.