File "editor_form.html"

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

<html>
<head><title>Insert Form</title>
<style>
  <%include editor_dialog.css%>
</style>
<script>

var name, action, method, encoding;

function initDialog () {
    name  = document.getElementById('name');
    action = document.getElementById('action');
    method = document.getElementById('method');
    encoding= document.getElementById('encoding');
}

function done () {
    var html = '<form';
    if (name.value) html += ' name="' + name.value + '"';
    if (action.value) html += ' action="' + action.value + '"';
    html += ' method="' + method.options[method.selectedIndex].value + '"';
    if (encoding.value) start += ' enctype="' + encoding.value + '"';
    html += ' style="border: 1px dotted red; padding: 2px"><p><br></p></form>';

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

</script>
</head>
<body class=body onload="initDialog()">
<table border=0 cellpadding=3 align=center>
        <tr class=body>
                <td><font size=1>Name: </font></td><td><input id=name size="30" class=textbox></input></td>
        </tr>
        <tr class=body>
                <td><font size=1>Action: </font></td><td><input id=action value="http://" size="30" class=textbox></input></td>
        </tr>
        <tr class=body>
                <td><font size=1>Method:</font></td>
                <td><select id=method class=textbox><option>POST</option><option>GET</option></select></td>
        </tr>
        <tr class=body>
                <td><font size=1>Encoding Type:</font></td><td><input id=encoding size="30" class=textbox></input></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>