Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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

↑ Back to the top


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

↑ Back to the top


Keywords: KB981303, kbprb, kbsurveynew, kbqfe, kbhotfixserver, kbfix

↑ Back to the top

Article Info
Article ID : 981303
Revision : 2
Created on : 2/3/2011
Published on : 2/3/2011
Exists online : False
Views : 231