File "editor_textarea.html"

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

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

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

function done () {
    var html = '<textarea';    

    if (name.value)  
      html += ' name="' + name.value + '"';
    if (cols.value) 
      html += ' cols='  + cols.value;
    if (rows.value) 
      html += ' rows='  + rows.value;
    if (tab.value)   
      html += ' tabindex="' + tab.value  + '"';

    html += '>'
    if (value.value) 
      html += value.value;
    html += '</textarea>';

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

</script>
<body class=body onLoad="initDialog()">
<table border=0 cellpadding=3 align=center>
    <tr class=body >
        <td valign=top>Name:</td>
        <td valign=top colspan=2><input size="30" id=name></td>
    </tr>
    <tr class=body >
        <td valign=top>Initial Value:</td>
        <td valign=top colspan=2><textarea id=value cols=25 rows=3></textarea></td>
    </tr>
    <tr class=body >
        <td>Cols:</td>
        <td valign=top width=30%><input id=cols size=2></td>
        <td valign=top>Rows: <input id=rows size=2></td>
    <tr>
    <tr class=body >
        <td >Tab Order:</td>
        <td colspan=2 valign=top><input id=tab size=2></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>