Is there a way to make the UltraWebTab height equal to the Height of the page/the area allowed by the browser. If one enter's 100% for Width, the Tab then takes up 100% of the pages Width. If one enter's 100% for Height, this fails to something maybe 50 characters high. I read on the forum that using this JavaScript could help ...
<asp:Content ID="Content2" runat="server" contentplaceholderid="head"> <script type="text/jscript"> function setScreenSize() { iHeight = window.frames(0).document.body.offsetHeight; var pageDiv = document.getElementById('divTag'); //increase overall height so there is NO inner scroll bar. Ie; inner and browser scroll bar. So if you increase then //you have the browser scroll bar which is want we want pageDiv.style.height = iHeight + 40; } </script></asp:Content><asp:Content ID="Content1" ContentPlaceHolderID="DataArea" runat="server"> <div id="divTag"> <table id="mainTab" style="width: 100%; height: 100%" cellspacing="0" cellpadding="0"> <tr valign="top" style="height:100%"> <td> <igtab:UltraWebTab ID="tabMain" runat="server" Width="100%" Height="100%"> </igtab:UltraWebTab> </td> </tr> </table> </div></asp:Content>
Hi,
To render itself the UltraWebTab uses <table>, where top row represents tab labels and bottom row represents content pane. The height of bottom <td> is set to 100%. Under xhtml it means that overall height of tab will be equal to intended height plus height of top static row used for tab labels. To handle exact height, the calculations on client are required, which are not used by UltraWebTab for several reasons (compatibility with older behavior, possible jumping on initialization and other side effects).
If application needs exact 100% height of tab on client, then it may use logic similar to codes below.Note: to support % height, application needs to set heights of <html>, <body> and <form> as well, and it should process onresize event in addition to onload.
<body style="height:90%" onload='adjustHeight()'><form id="form1" runat="server" style="height:100%"> <div id="divTag" style="border:1px solid red;height:100%;width:100%;"> <igtab:UltraWebTab ID="UltraWebTab1" runat="server" Height="100%" Width="100%"> <Tabs> <igtab:Tab Text="New Tab"></igtab:Tab> <igtab:Tab Text="New Tab"></igtab:Tab> </Tabs> </igtab:UltraWebTab> </div></form></body></html>
Hi, This helps me a lot for setting a tab control height in IE 7 at client side. But when it's not working for IE8. I am loading same object in IE7 and IE8, the cp.offsetHeight has big different values. In IE7, my cp.offsetHeight is 509, but it is 166 in IE8. Could you please let me know what is the solution for IE8?
Thanks!