Is there a method to manage some controls inside a websplitter
I have a WebSplit with 2 panes
In panes(1) there are 20 text box
I'd like to set their text values with a for each control in ..... next
But if I try this no controls are found
webPlit.panes(1).controls.count value is always 0 .... (zero)
Why?
Any help will be greatly appreciated!
Hi Tommy,
The splitter and its panes are javascript objects, but not html elements. So, you should use methods available for those objects. Below is example
<ig:WebSplitter ID="WebSplitter1" runat="server" Height="150px" Width="400px"> <Panes> <ig:SplitterPane runat="server"> </ig:SplitterPane> <ig:SplitterPane runat="server"> <Template> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> <input id="myInputField" /> </Template> </ig:SplitterPane> </Panes> </ig:WebSplitter><script type="text/javascript"> function setFields() { var splitter = $find('<%=WebSplitter1.ClientID%>'); var pane2 = splitter.get_panes()[1]; //or //var pane2 = splitter.getPaneAt(1); var textBox1 = pane2.findChild('TextBox1'); var textBox2 = $get('<%=TextBox2.ClientID%>'); var myInput = pane2.findChild('myInputField'); //or //var myInput = $get('myInputField'); if(textBox1) textBox1.value = 'new value1'; if(textBox2) textBox2.value = 'new value2'; if(myInput) myInput.value = 'new value'; }</script><input type="button" value="setValues" onclick="setFields()" />