How do I run a function on a WebSplitter pane from the other WebSplitter pane.
How do I get values from controls on pane1, from pane2?
I am using C#, is there any plans on having more detail in your "help" code? Actual content in your panes? Show them interacting more? WebSplitter uses iframes so maybe have some "real life" demos that other users/clients actually do. There is no demo on how to change ContentUrl, no demo on running functions from one pane on a different pane, no demo on how to get values from one pane in another. No demo on how to really do anything in C# or codebehind.
Hi,
If you refer to application, which uses ContentUrl, then unfortunately there is no built-in features in WebSplitter (or other controls like WebTab), which will allow to access child controls located on ContentUrls of different content panes. Because, the only thing WebSplitter does for that property is to create IFRAME and set its src to that property. That is 100% identical to scenario if you put in your aspx few IFRAMEs and set their src to web sites or local aspx pages.
In case of server, as far as I know, the only exchange data/events between local aspx pages located in iframes can be accomplished throgh global storage like Session. One aspx can put there values for its specific fields and other aspx using those values in Session may read them, modify, etc. That can be 1 or 2 way exchange, but only application may do that. Sure, similar is rather obscure and unreliable and not related to WebSplitter.
On client is similar situation, however, since javascript objects can be accessed publically, exchange of data can be much more powerful.Actually $IG.LayoutPane (base class for $IG.SplitterPane) has help method findChild(id), which allows to find reference to local child html element by its partial ID (useful for naming containers). That method also attempts to find child in possible ContentUrl. But that is nothing more thanIFRAME.contentWindow.document.getElementById(id);
The best what I can do for you, is to give an example how object located in one iframe may access object located in another iframe.
Assume that you have main page which has WebSplitter1. That WebSplitter has 2 panes. First pane has ContentUrl with aspx, which has a button with codes below. Second pane has ContentUrl with another aspx and that aspx has TextBox1.For simplicity I skipped all validations for nulls, but real codes should validate every object before using its members.
aspx assigned to ContentUrl in 1st pane of WebSplitter1 located on main page:
<body> <form id="form1" runat="server"> <script type="text/javascript"> function findText() { var mainWindow = window.top; // or window.parent, or similar. var splitter = mainWindow.$find('WebSplitter1'); var pane2 = splitter.getPaneAt(1); var textBox = pane2.findChild('TextBox1'); alert('textBox on 2nd pane:' + textBox.value); textBox.value = 'message from 1st pane'; } </script> <input type="button" onclick="findText()" value="findText" /> </form></body>