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
570
set websplitter's width and height when the page is load
posted

when the page was loading, how can I set websplitter's width and height.  Now I wrote the below code:

js code:

function SetSize()
 {
     var w=document.documentElement.offsetWidth;
     var h=document.documentElement.offsetHeight;
     var splitter = $find("WebSplitterTree");
     splitter._element.style.width = (w-4)+"px";
     splitter._element.style.height = (h-87)+"px";
}

page code:

<body onload="SetSize();">.......</body>

But program can not find the websplitter.  I output the splitter by alert, the result is null.  Why I can't set websplitter's size when in body's onload event?

Parents
No Data
Reply Children
No Data