DHTMLX Docs & Samples Explorer

dhtmlxCombo

From JSON From XML
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>
    <script src="../../../dhtmlxCombo/codebase/ext/dhtmlxcombo_extra.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxCombo/codebase/dhtmlxcombo.css">
    <style>
        td.p2 {
            padding-left: 50px;
        }
    </style>
    <script>
var myForm,
myForm2,
formData;
function doOnLoad() {
    dhtmlx.skin = "dhx_skyblue";
    window.dhx_globalImgPath = "../../../dhtmlxCombo/codebase/imgs/";
    formData = [{
        type: "settings",
        position: "label-left",
        labelWidth: 140,
        inputWidth: 160
    }, {
        type: "label",
        label: "New project"
    }, {
        type: "input",
        label: "Project Name",
        value: "New project"
    }, {
        type: "label",
        label: "Audio settings"
    }, {
        type: "combo",
        label: "Format",
        name: "format",
        options: [{
            text: "AAC",
            value: "AAC"
        }, {
            text: "AC3",
            value: "AC3",
            selected: true
        }, {
            text: "MP3",
            value: "MP3"
        }, {
            text: "FLAC",
            value: "FLAC"
        }]
        }, {
        type: "combo",
        label: "Bitrate",
        name: "a_bitrate",
        options: [{
            text: "128 kbps",
            value: "128"
        }, {
            text: "160 kbps",
            value: "160"
        }, {
            text: "256 kbps",
            value: "256"
        }, {
            text: "320 kbps",
            value: "320",
            selected: true
        }, {
            text: "448 kbps",
            value: "448"
        }]
        }, {
        type: "combo",
        label: "Channels",
        comboType: "checkbox",
        name: "channels",
        options: [{
            text: "2.0 Stereo",
            value: "2_0"
        }, {
            text: "5.1 Dolby Digital",
            value: "5_1",
            selected: true
        }]
        }, {
        type: "label",
        label: "Video settings"
    }, {
        type: "combo",
        label: "Codec",
        name: "v_codec",
        options: [{
            text: "DivX",
            value: "DivX"
        }, {
            text: "XviD",
            value: "XviD",
            selected: true
        }]
        }, {
        type: "combo",
        label: "Bitrate",
        name: "v_bitrate",
        options: [{
            text: "728 kbps",
            value: "728"
        }, {
            text: "1226 kbps",
            value: "1226",
            selected: true
        }, {
            text: "2412 kbps",
            value: "2412"
        }]
        }, {
        type: "label",
        label: "Advanced"
    }, {
        type: "input",
        label: "Command line options",
        rows: 2,
        value: "-vf crop=618:526:0:14,pp=lb"
    }];
    myForm = new dhtmlXForm("myForm", formData);
    myForm2 = new dhtmlXForm("myForm2");
    myForm2.loadStruct("../common/dhxform_combo.xml?e=" + new Date().getTime());
}
</script> <table> <tr> <td>From JSON</td> <td class="p2">From XML</td> </tr> <tr> <td valign="top"><div id="myForm" style="height:400px;"></div></td> <td valign="top" class="p2"><div id="myForm2" style="height:400px;"></div></td> </tr> </table>