Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
HOW TO: Make UltraWebTab Height = the size of the page.
posted

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 ...

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;
}

...but it didn't.   Could someone please state in code how to make the Tab shrink and grow in height with the size of the page using MasterPages.   My idea follows but it doesn't work.   Please advise how to fix it.

<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>