DHTMLX Docs & Samples Explorer

### Buttons Events

Catch "onHelp" event
Redefine default "Park" event
Source

    <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxwindows.css">
    <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxwindows_dhx_skyblue.css">
    <script src="../../codebase/dhtmlxcommon.js"></script>
    <script src="../../codebase/dhtmlxwindows.js"></script>

    <script src="../../codebase/dhtmlxcontainer.js"></script>

    <div>
    Catch "onHelp" event
    <br>
    Redefine default "Park" event
    </div>
    <div id="winVP" style="position: relative; height: 500px; border: #cecece 1px solid; margin: 10px;"></div>
    <script>var dhxWins,
    w1;
    function doOnLoad() {
        dhxWins = new dhtmlXWindows();
        dhxWins.enableAutoViewport(false);
        dhxWins.attachViewportTo("winVP");
        dhxWins.setImagePath("../../codebase/imgs/");
        w1 = dhxWins.createWindow("w1", 20, 30, 320, 240);
        w1.setText("dhtmlxWindow");
        w1.button("close").disable();
        w1.button("help").show();
        dhxWins.window("w1").attachEvent("onHelp", function() {
            alert("button \"Help\" was clicked");
        });
        w1.button("park").attachEvent("onClick", function() {
            alert("button \"Park\" was clicked");
        });
    }</script>