File "editor_checkbox.html"

Full Path: /home/analogde/www/private/templates/common/editor_checkbox.html
File size: 1.93 KB
MIME-type: text/html
Charset: utf-8

<html>
<title>Checkbox</title>
<style>
<%include editor_dialog.css%>
</style>
<script>

var name, value, initial, tab;
function initDialog() {
    name  = document.getElementById('name');
    value = document.getElementById('value');
    initial= document.getElementById('initial');
    tab   = document.getElementById('tab');
}

function done () {
/* ---------------------------------------------------------
 * When the user hits done this fucntion is called to 
 * produce the html from the div tags. It then inserts
 * it into the edit window and closes this window.
 */
    var html = '<input type="checkbox"';
    if (name.value) 
      html += ' name="' + name.value  + '"';
    if (value.value) 
      html += ' value="' + value.value + '"';
    if (tab.value) 
      html += ' tabindex="' + tab.value + '"';
    if (initial.checked) 
      html += ' checked';
    html += '>';

    opener.dialogWindow.returnFunc(html);
    window.close();
}

// -->
</script>
<body class=body onLoad="initDialog()">
<table border=0 cellpadding=3 align=center>
    <tr class=body>
        <td>Name:</td><td><input id=name size=30></td>
    </tr>
    <tr class=body>
        <td>Value:</td><td><input id=value size=30></td>
    </tr>
    <tr class=body>
        <td>Initial State:</td>
        <td>
            <table border=0>
                <tr class=body>
                    <td>
                        <input value=on type=radio id=initial name=initial> Selected
                    </td>
                    <td>
                        <input value=off type=radio id=initial name=initial> Not Selected
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr class=body>
        <td>Tab order:</td><td><input id=tab size=3></td>
    </tr>
</table>
<hr>
<div align=right>
    <button class=button onclick="done();">OK</button> &nbsp;
    <button class=button onclick="window.close();">Cancel</button>&nbsp;
</div>
</body>
</html>