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 ...
Hi,
You may insert debugger; statement in codes where you set/get all those values and check in debugger instant values of different objects. Maybe you will need to use different object (for example, html instead of body) or different properties (maybe client/scrollHeight/Width instead of offsetWidht/Height).
You also may try to check in debugger offsetWidth of iframe (and its parent node, etc.) after you applied your calculated size to div.
If debugging breaks behavior, then you may output on screen all values you are interested in (append to innerHTML of a div with position:absolute)
Thank you for responding and for the syntax example. Too bad that this is not part of the default behavior of the tab control just like it would be on a windows form application.
I basically came up with same thing and I'll probably change to using your code for the frame control. I put the tab control in a div tag and then adjusted size of div tag where tab control height at 100% it sized automatically. However there is one little hack that I've had to do and I wonder if you recommend some other method. I'm having to add another extra 40px to the height of the div tag to remove any inner scroll bar to the iFrame of the tab control. For example if I don't add the buffer, then there MIGHT be 3 scroll bars; 1) scroll bar on page hosted in tab, 2) scroll bar on tab control, and 3) scroll bar on browser. By adding the buffer I only have the one scroll bar, but it seems clunky to have to do that.
Other recommendations? Thanks again ....
//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;}
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