Show/Hide fieldset

  1. #1

    Show/Hide fieldset

    Hello,
    I've got problem with showing and hiding field set. I used to use code as below in Ext.NET 1.x, but in v2.0 there is an error (fieldset1 is not defined) in function showHideFieldSet.
    This is my code:
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script type="text/javascript">
            var showHideFieldSet = function () {
                if (fieldset1.isVisible()) {
                    fieldset1.hide();
                }
                else {
                    fieldset1.show();
                }
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResMng" runat="server" Locale="cs-CZ" StateProvider="Cookie" />
        <ext:Viewport runat="server">
            <Items>
                <ext:FieldSet ID="fieldset1" runat="server" Title="Test" Hidden="false">
                    <Items>
                        <ext:ComboBox ID="combobox1" runat="server" FieldLabel="TestCombo">
                            <Items>
                                <ext:ListItem Text="Item1" />
                                <ext:ListItem Text="Item2" />
                            </Items>
                        </ext:ComboBox>
                    </Items>
                </ext:FieldSet>
                <ext:Button ID="ShowHideButton" Text="Show/Hide" runat="server" >
                    <Listeners>
                        <Click Fn="showHideFieldSet" />
                    </Listeners>
                </ext:Button>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Please help me.
  2. #2
    ​Use App.fieldset1 instead fieldset1
  3. #3
    Quote Originally Posted by Vladimir View Post
    ​Use App.fieldset1 instead fieldset1
    Thanks. That's it.

Similar Threads

  1. GridPanel Hide/Show Columns
    By vs.mukesh in forum 1.x Help
    Replies: 1
    Last Post: Oct 30, 2010, 4:29 PM
  2. Show/Hide tabs
    By stone216 in forum 1.x Help
    Replies: 2
    Last Post: Oct 01, 2009, 8:21 PM
  3. [CLOSED] Show and hide two panes
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 04, 2009, 10:54 AM
  4. How to hide/show ImageButton in JavaScript?
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: Jun 16, 2009, 3:47 PM
  5. FieldSet's FieldLabel don't show
    By mengfb in forum 1.x Help
    Replies: 1
    Last Post: Jun 07, 2009, 2:53 PM

Tags for this Thread

Posting Permissions