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
160
Tab height not adjusting to content page height ...
posted

So what's the magic trick or how much javascript is necessary to make the UltraWeb Tab height adjust automatically to the height of the aspx page that is associated that is the Tabs ContentPane TargetURL. Oh yes the height should also match pretty close to the height of the browser window.

Tried Height=100% and no luck, tried Style Height =100% and no luck. If I use pixed then it works, but that is a terrible design. It should size according to the browser height.

Thanks ...

 

Parents
  • 24497
    posted

    Hi,

    That can be really tricky. The best UltraWebTab can do for you, is provide reference to <iframe> used for targetUrl.

    For example:

    var frameOnFirstTab = oWebTab.Tabs[0].elemIframe;

    So, you may try to get offsetWidth/Height, scrollWidth/Height or whatever attributes of its children you need in order to get actual size of page. There is also getTargetUrlDocument() member function of tab, which tries to get reference to document of iframe. But in case of www it will fail, and maybe will work only when target is local aspx.

    To adjust size of control you may try to use parent(s) of that iframe, but all that on your own risk. Those operations are not supported.

    var height = 400;
    var td = frameOnFirstTab.parentNode;
    td.style.height = 400 + 'px';
    //td.style.border='1px solid red';//debug

Reply Children