Whenever you load a tab dynamically with a cflayoutarea (tab) in Coldfusion 9 it won't get the height right (usually just does like 20px high). This will also happen when trying to reload a tab with coldfusion.navigate. I need to figure out how to access the underlying EXT or use coldfusion functions to get these tabs to redraw. As of now my only workaround is assigning a height to it, but that will create scrollbars instead of just correctly fitting the height as it should. Below is a example layoutarea:
<cflayout type="tab" style="padding:5px; width:940px;" name="ajaxTabs">
<cflayoutarea name="tab0" selected="#tab0#" style="padding:5px; min-height:450px;" overflow="auto" refreshonactivate="yes"
title="<p id='n1'>Saved Newsletters</p>"
source="#myself##xfa.savedNewsletters#" />
I've gotten the formula to get the layoutarea to react but haven't figured out exactly what I need to get it to resize (Below is just an attempt to jump start the height by disabling/enabling):
<cfsavecontent variable="theJS">
<script type="text/javascript">
function resizeTab() {
var activeID = ColdFusion.Layout.getTabLayout('ajaxTabs').getActiveTab().id;
ColdFusion.Layout.disableTab('ajaxTabs', activeID);
ColdFusion.Layout.enableTab('ajaxTabs', activeID);
ColdFusion.Layout.selectTab('ajaxTabs', activeID);
return;
}
</script>
</cfsavecontent>
<cfhtmlhead text="#theJS#">
<cfset ajaxOnLoad('resizeTab')>