A simple window with the button 'Close'. On the button click the window will be closed.
<body> <script type="text/javascript" charset="utf-8"> dhx.ui({ view:"window", head:{ view:"button", label:"Close", click:"close_window" }, // in the 'Click' parameter we wrote the name of the function (defined later). body:"", top:100, left:100 }); function close_window(){ this.getParent().close(); } </script> </body>