DHTMLX Docs & Samples Explorer

Attaching Object and Adjusting

First Name:
Last Name:
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>
<table width="500">
    <tr>
        <td align="left" style="padding-top: 10px; padding-bottom: 10px;"><input type="button" value="Attach Object" onclick="w1.attachObject('obj',true);"></td>
    </tr>
    <tr>
        <td>
            <div style="width: 300px; height: 120px; overflow: auto; border: #909090 1px dashed;">
                <div id="obj" style="font-family: Tahoma; font-size: 10px; height: 100%; overflow: auto; background-color: #FFFFFF;">
                    <table width="100%" style="margin-top: 10px;">
                        <tr>
                            <td width="100" align="right">First Name:</td>
                            <td><input type="text"></td>
                        </tr>
                        <tr>
                            <td align="right">Last Name:</td>
                            <td><input type="text"></td>
                        </tr>
                        <tr>
                            <td colspan="2" align="center"><input type="button" value="Ok"> <input type="button" value="Cancel"></td>
                        </tr>
                    </table>
                </div>
            </div>
        </td>
    </tr>
</table>
</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.denyResize();
    w1.denyPark();
    w1.button("minmax1").hide();
    w1.button("park").hide();
}
</script>