DHTMLX Docs & Samples Explorer

### Change parent

Source

    <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxcalendar.css"></link>
        <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxcalendar_dhx_skyblue.css"></link>
        <script src="../../codebase/dhtmlxcalendar.js"></script>
        <style>
            td.td {
                text-align: center;
            }
            div#calendarHere1, div#calendarHere2 {
                position: relative;
                width: 200px;
                height: 250px;
            }
        </style>
        <script>var myCalendar;
    function doOnLoad() {
        myCalendar = new dhtmlXCalendarObject("calendarHere1");
        myCalendar.show();
    }</script>

        <table border="1">
            <tr>
                <td class="td"><input type="button" value="Show here" onclick="myCalendar.setParent('calendarHere1');"></div></td>
                <td class="td"><input type="button" value="Show here" onclick="myCalendar.setParent('calendarHere2');"></div></td>
            </tr>
            <tr>
                <td class="td"><div id="calendarHere1" style="position:relative;height:250px;"></div></td>
                <td class="td"><div id="calendarHere2" style="position:relative;height:250px;"></div></td>
            </tr>
        </table>