Problems with toolbar buttons

  1. #1

    Problems with toolbar buttons



    I'm creating a DesktopWindow with toolbar and I added a button in toolbar. I'm problem with button in event onClientClick.

    This is my src...
    <TopBar>
        <ext:Toolbar ID="tb_addUsr" runat="server">
            <Items>
                <ext:Button ID="btn_addUsr" runat="server" Icon="Add" OnClientClick="convUsr();"></ext:Button>
                <ext:Button ID="btn_close" runat="server" Icon="DoorIn" OnClientClick="close();"></ext:Button>
            </Items>
        </ext:Toolbar> 
    </TopBar>
    Thanks for attention!
  2. #2

    RE: Problems with toolbar buttons

    *Hi,

    What a problem do you have?




  3. #3

    RE: Problems with toolbar buttons

    It does not call the method, gives error when calling the event.
  4. #4

    RE: Problems with toolbar buttons

    Hi,

    Whats error? I tested it and it seems it works very well


    *
  5. #5

    RE: Problems with toolbar buttons

    Hi flaviodamaia,

    I tested your code as well and it does appear to get configured correctly. Maybe there's a JavaScript error being thrown? If you test in Firefox with Firebug installed, does it trap an error?

    Another option (recommended) would be to use the <Listeners> configuration.

    Example

    <TopBar>
        <ext:Toolbar ID="tb_addUsr" runat="server">
            <Items>
                <ext:Button ID="btn_addUsr" runat="server" Icon="Add">
                    <Listeners>
                        <Click Handler="convUsr();" />
                    </Listeners>
                </ext:Button>
                <ext:Button ID="btn_close" runat="server" Icon="DoorIn">
                    <Listeners>
                        <Click Handler="close();" />
                    </Listeners>
                </ext:Button>
            </Items>
        </ext:Toolbar>
    </TopBar>
    Hope this helps.

    Geoffrey McGill
    Founder
  6. #6

    RE: Problems with toolbar buttons

    Vladsch,
    I'm working with Desktop layout. I tested too with <ext:window> and worked, but with <ext:DesktopWindow> not work.
    Why with <ext:window> worked and with <ext:DesktopWindow> does not work?
  7. #7

    RE: Problems with toolbar buttons



    geoffrey.mcgill (1/7/2009)Hi flaviodamaia,

    I tested your code as well and it does appear to get configured correctly. Maybe there's a JavaScript error being thrown? If you test in Firefox with Firebug installed, does it trap an error?

    Another option (recommended) would be to use the <Listeners> configuration.

    Example

    <TopBar>
        <ext:Toolbar ID="tb_addUsr" runat="server">
            <Items>
                <ext:Button ID="btn_addUsr" runat="server" Icon="Add">
                    <Listeners>
                        <Click Handler="convUsr();" />
                    </Listeners>
                </ext:Button>
                <ext:Button ID="btn_close" runat="server" Icon="DoorIn">
                    <Listeners>
                        <Click Handler="close();" />
                    </Listeners>
                </ext:Button>
            </Items>
        </ext:Toolbar>
    </TopBar>
    Hope this helps.
    I did with <Listeners> and worked!


    Thanks for attention vladasch and Geoffrey McGill!

Similar Threads

  1. Replies: 2
    Last Post: Mar 14, 2012, 2:05 PM
  2. Replies: 7
    Last Post: May 25, 2011, 9:35 AM
  3. Postbacks and validation with toolbar buttons
    By daneel in forum 1.x Help
    Replies: 0
    Last Post: Mar 12, 2010, 2:20 PM
  4. Horizantal Scrolling of Buttons in a Toolbar?
    By yaser82 in forum 1.x Help
    Replies: 0
    Last Post: May 06, 2009, 10:46 AM
  5. Replies: 5
    Last Post: Aug 15, 2008, 3:28 PM

Posting Permissions