DHTMLX Docs & Samples Explorer

Options/Value for Select in Async mode

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>
<script src="../../codebase/ext/dhtmlxform_item_combo.js"></script>
<script src="../../../dhtmlxCombo/codebase/dhtmlxcombo.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxCombo/codebase/dhtmlxcombo.css">
<script>
var myForm,
formData;
function log(message) {
    document.getElementById('log_div').innerHTML += "<div>" + message + "</div>";
}
function doOnLoad() {
    dhtmlx.skin = "dhx_skyblue";
    window.dhx_globalImgPath = "../../../dhtmlxCombo/codebase/imgs/";
    formData = [{
        type: "settings",
        position: "label-left",
        labelWidth: 100,
        inputWidth: 140
    }, {
        type: "fieldset",
        label: "Welcome",
        inputWidth: "auto",
        list: [{
            type: "select",
            label: "Package",
            name: "package",
            connector: "php/opts_async_options.php?t=select&etc=" + new Date().getTime()
            }, {
            type: "combo",
            label: "Format",
            name: "format",
            connector: "php/opts_async_options.php?t=combo&etc=" + new Date().getTime()
            }]
        }];
    myForm = new dhtmlXForm("myForm", formData);
    myForm.attachEvent("onOptionsLoaded", function(name) {
        log((name == "package" ? "select": "combo") + " options loaded");
    });
    myForm.load("php/opts_async_values.php?etc=" + new Date().getTime(), function() {
        log("values loaded");
    });
}
</script> <div id="myForm" style="height:160px;"></div> <div id="log_div" style='clear:both; padding:10px; font-family:monospace;'></div>