Skip to main content
August 20, 2010
Question

CF 9.0.1 cflayout tab - first tab - content height problem in IE 7

  • August 20, 2010
  • 2 replies
  • 4383 views

In IE 7, the first tab's height is incorrectly rendered - it is the combined height of the up/down arrows in the scroll bar instead of the tab's content. The rest of the tabs are rendered correctly. I am using IE 8, and changed the Document Mode to: "IE 7 Standards." It renders fine in IE 8 or even Quirks mode.

I'm not sure if CF 9.0.1 update created this problem. Can someone test this code on CF 9.0?

Here's a very simple test case - copy/paste this to a new .cfm file and take a look on IE 7 (or IE 7 Standards mode in IE 😎

<cfoutput><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html style='height:100%;'>
<head>
    <title>CF Tabs Example</title>
</head>
<body>
</cfoutput>

<cfajaximport tags="cflayout-tab">

<cflayout type="tab">

    <cflayoutarea title="Tab 1">
       
        <cfoutput>
        <p>This is the first tab!</p>
        <p>This is the first tab!</p>
        <p>This is the first tab!</p>
        <p>This is the first tab!</p>
        <p>This is the first tab!</p>
        <p>This is the first tab!</p>
        </cfoutput>
       
    </cflayoutarea>
   
    <cflayoutarea title="Tab 2">
       
        <cfoutput>
        <p>This is the second tab!</p>
        <p>This is the second tab!</p>
        <p>This is the second tab!</p>
        <p>This is the second tab!</p>
        <p>This is the second tab!</p>
        <p>This is the second tab!</p>
        </cfoutput>
       
    </cflayoutarea>
   
</cflayout>

<cfoutput>
</body>
</html>
</cfoutput>

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    August 30, 2010

    This worked for me,

    cflayout.js file

    change    _1c.style.height=_1b;

    to          _1c.height=_1b;

    August 30, 2010

    Nice work Nicolas! That works on my side too... I tested it on IE, FF, Safari and Chrome. Thank you!

    Known Participant
    August 30, 2010

    I will give this a go.  My only worry is that, even if it works, will it be any use to me when the site I want to use it on is hosted on shared hosting?  Presumably I would have to ask my host to consider making this change to the file?  Perhaps they'd be reluctant to make an unofficial change to one of the included bits of javascript?  Excuse my ignorance on this matter - it's not something I've asked a host to do before.

    Participant
    August 25, 2010

    Good test case. On my CF9.0.0 it shows the full first tab fine, but on my 9.0.1 server it hides all but the first line in tab 1. This is in IE 8; works fine in Firefox.

    When I change doctypes, it changes the behavior a little: html 4.0 transitional works in compatibility mode and out of compatibility mode. But 4.01 strict and xhtml 1 transitional both work at first, then break when I go into compatibility mode.

    August 26, 2010

    Just to confirm, this is only when getting content from your CF 9.0.1 server, correct? That would confirm my theory that CF 9.0.1 updater broke tabs certain versions of IE.

    Participant
    August 26, 2010

    Correct. The first tab fully displays in IE 8 both compatibility mode and 'regular' mode when running on CF 9.0.0 (actually, maybe I should spell out: Coldfusion Server Developer 9,0,0,251028

    and does not work in Coldfusion Server Enterprise 9,0,1,274733  as I stated.

    I found some posts about making minor corrections to the "cflayout.js" but I think those were changes to the 9.0.0 scripts, because it was very different from the 9.0.1 cflayout.js script.

    Bottom line - I "fixed" it by putting in the fix script into CFIDE\scripts\ajax\package\cflayout.js

    And when I say the fix script it's almost the original 9.0.0 one, but I got it here:

    http://forums.adobe.com/thread/565912?tstart=0

    it was posted by "MrTee" on Feb 23rd in a reply.