If a WebDock or WebSplitter is not rendered to the browser in the initial page load, but is only rendered in a later Ajax response, then the external JavaScript files required by these controls may not be loaded. As a result, the following JavaScript error will be thrown upon the Ajax response:
Error: 'ZC' is undefined
In IE, the message 'Error on page.' will be displayed at the lower left corner of the browser window. You can double-click that message to examine the JavaScript error detail.
In Firefox or Google Chrome, no error message would be observed. But the content of the panels within the WebDock or WebSplitter will appear to be stacked / packed, and the splitter bars will not be shown.
Workaround:
Add a dummy 0px by 0px WebDock or WebSplitterContainer so as to force the required JavaScript files to be loaded in initial page load.
If you are using WebDock, add the following to the end of the page, and outside of any UpdatePanel or controls:
<cc2:WebDock runat="server" ID="Dummy" Height="0px" Width="0px"></cc2:WebDock>
If you are using WebSplitter, add the following to the end of the page, and outside of any UpdatePanel or controls:
<cc2:WebSplitterContainer runat="server" ID="Dummy" Height="0px" Width="0px"></cc2:WebSplitterContainer>
Examples that can cause this problem:
- An UpdatePanel contains a Button and a WebSplitterContainer. The WebSplitterContainer's Visible property is initially set to false. On Button clicked, the WebSplitterContainer's Visible property is set to true. At run-time, when you click the button, the WebSplitterContainer is rendered upon Ajax response, but the required JavaScript files have not been loaded.
- An UpdatePanel contains a Wizard control. A WebDock is added to step 2 of the Wizard. At run-time, when you advance to step 2, the WebDock is rendered upon Ajax response, but the required JavaScript files have not been loaded.