source: trunk/plugins/Forms/popups/textarea.html @ 191

Last change on this file since 191 was 191, checked in by gocher, 14 years ago

new plugin forms

File size: 2.5 KB
Line 
1<html>
2
3<head>
4  <title>Insert/Edit Form Element TEXTAREA</title>
5  <link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
6  <script type="text/javascript" src="../../../popups/popup.js"></script>
7
8<script type="text/javascript">
9var type;
10function Init() {
11  __dlg_translate("Forms");
12        __dlg_init();
13        var param = window.dialogArguments;
14  type = param.f_type;
15  var d = document;
16  d.getElementById("f_name").value = param.f_name;
17        d.getElementById("f_value").value = param.f_value;
18        d.getElementById("f_cols").value = param.f_cols;
19        d.getElementById("f_rows").value = param.f_rows;
20        window.resizeTo(280,260);
21        d.getElementById("f_name").focus();
22};
23
24function onOK() {
25        var d = document;
26        var el = d.getElementById("f_name");
27        if (!el.value) {
28        alert("You must enter a Name");
29                el.focus();
30          return false;
31        }
32        var param = new Object();
33  param["f_type"] = type;
34  param["f_name"] = d.getElementById("f_name").value;
35        param["f_cols"] = d.getElementById("f_cols").value;
36  param["f_rows"] = d.getElementById("f_rows").value;
37  param["f_value"] = d.getElementById("f_value").value;
38  __dlg_close(param);
39  return false;
40};
41
42function onCancel() {
43        __dlg_close(null);
44        return false;
45};
46</script>
47<style rel="stylesheet" type="text/css">
48DIV.line        {       clear: both;    }
49
50LABEL   {
51        padding-top: 3px;
52        padding-left: 3px;             
53        padding-right: 3px;     
54        }
55       
56LABEL.label     {
57        float: left;
58        width: 8em;
59        text-align: right;
60        }       
61</style>
62</head>
63
64<body onload="Init()">
65<div id="f_type" class="title">Form Element: TEXTAREA</div>
66<form action="" method="get">
67  <div class="line"><label class="label" for="name">Name/ID:</label>
68  <input type="text" name="name" id="f_name" title="name of the textarea" /></div>
69  <div class="space"></div>
70  <fieldset>
71        <legend>Dimensions</legend>
72    <div class="line"><label class="label" for="cols">Columns:</label>
73    <input type="text" name="cols" id="f_cols" size="5" title="Width in number of characters" /></div>
74    <div class="line"><label class="label" for="rows">Rows:</label>
75                <input type="text" name="rows" id="f_rows" size="5" title="Height in number of rows" /></div>
76        </fieldset>
77  <div class="space"></div>
78  <div class="line"><label class="label" for="name">Default contents:</label>
79  <input type="text" name="value" id="f_value" title="Default text (optional)" /></div>   
80  <div id="buttons">
81    <button type="button" name="ok" onclick="return onOK();">OK</button>
82    <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
83  </div> 
84</form>
85
86</body>
87</html>
Note: See TracBrowser for help on using the repository browser.