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?
I already solved this problem. Below Code:
<ClientEvents Initialize="SetSize" />