DHTMLX Docs & Samples Explorer

XML Loading Events - onXLS/onXLE

Log (clear)
Source
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxform_dhx_skyblue.css">
    <script src="../../codebase/dhtmlxcommon.js"></script>
    <script src="../../codebase/dhtmlxform.js"></script>
    <style>
        div#simpleLog {
            height: 200px;
            font-family: Tahoma;
            font-size: 11px;
            overflow: auto;
        }
    </style>
    <script>
var myForm,
logObj;
function doOnLoad() {
    myForm = new dhtmlXForm("myForm");
    myForm.attachEvent("onXLS", function() {
        logEvent("onXLS event called<br>");
    });
    myForm.attachEvent("onXLE", function() {
        logEvent("onXLE event called<br>");
    });
    myForm.loadStruct("../common/dhxform.xml?e=" + new Date().getTime());
}
function logEvent(t) {
    if (!logObj)
        logObj = document.getElementById("simpleLog");
    logObj.innerHTML += t;
}
function clearLog() {
    if (!logObj)
        logObj = document.getElementById("simpleLog");
    logObj.innerHTML = "";
}
</script> <table> <tr><td><div id="myForm"></div></td></tr> <tr><td><b>Log (<a href="javascript:void(0);" onclick="clearLog();">clear</a>)</b></td></tr> <tr><td><div id="simpleLog"></div></td></tr> </table>