The COLS attribute incorrectly calculates the width of frames in Internet Explorer 8

This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
You develop a webpage that uses the COLS attribute to set and retrieve the width of frames in a frameset. When you open this webpage in Windows Internet Explorer 8, the COLS attribute may incorrectly calculate the width of frames.

Note This problem occurs when you specify the width of frames in numbers of pixels. If you use percentage to specify the width of frames, this problem will not occur.

For a sample of code to reproduce this problem, see the "More information" section.
RESOLUTION

Security update information

To resolve this problem, install the most recent cumulative security update for Windows Internet Explorer. To do this, visit the following Microsoft website: For more technical information about the most recent cumulative security update for Windows Internet Explorer, visit the following Microsoft website: Note This update was first included in security update 2360131 (MS10-071). For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2360131 MS10-071: Cumulative security update for Internet Explorer
MORE INFORMATION

Sample code to reproduce this issue

The following is an example of the code that you can use in a frame of a webpage to set and retrieve the width of the frame:
<html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><title>IE8 Frameset Cols Test</title><script type="text/javascript"> function get_col_width(){alert(parent.document.getElementById('ParentFrame').cols);}function set_col_width(){parent.document.getElementById('ParentFrame').cols = '100,*';}function set_col_width_pcnt(){parent.document.getElementById('ParentFrame').cols = '10%,*';}</script> </head><body><button onclick="get_col_width()">Get Col width</button><button onclick="set_col_width()">Set Col width to (100,*)</button><button onclick="set_col_width_pcnt()">Set Col width to (10%,*)</button></body></html>
In this example, you have the following three buttons:
  • The Get Col width button. You click this button to receive a message that shows the width of frames.
  • The Set Col width to (100,*) button. You click this button and then manually drag the frame splitter to set the width of frames in pixels.
  • The Set Col width to (10%,*) button. You click this button and then manually drag the frame splitter to set the width of frames in percentage.
However, you notice the following:
  • If you click the Set Col width to (10%,*) button and then drag the frame splitter, you receive the correct width of frames.
  • If you click the Set Col width to (100,*) button and then drag the frame splitter, you may receive the wrong width of frames.

For more information about the COLS attribute, visit the following Microsoft website:For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
width of frame is wrong receive a big number of cols property that is out of the screen scope
Properties

Article ID: 981303 - Last Review: 12/12/2015 03:42:21 - Revision: 1.1

Windows Internet Explorer 8

  • kbnosurvey kbarchive kbfix kbhotfixserver kbqfe kbsurveynew kbprb KB981303
Feedback