-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtextbox.xul
63 lines (53 loc) · 1.83 KB
/
textbox.xul
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="XUL Textboxes"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>
<![CDATA[
function setText(textBoxID)
{
var result = document.getElementById(textBoxID).value;
document.getElementById("result").value = result;
}
]]>
</script>
<description><html:h1>XUL Textboxes</html:h1></description>
<vbox flex="1" style="overflow: auto" >
<hbox align="center">
<label style="width:10em" value="Default:"/>
<textbox id="default" oninput="setText('default');" />
</hbox>
<hbox align="center">
<label style="width:10em" value="Disabled:" />
<textbox id="disabled" disabled="true" value="disabled" size="10"
oninput="setText('disabled');" />
</hbox>
<hbox align="center">
<label style="width:10em" value="Readonly:" />
<textbox id="readonly" readonly="true" value="readonly" size="30"
oninput="setText('readonly');" />
</hbox>
<hbox align="center">
<label style="width:10em" value="Max length of 20:" />
<textbox id="max-length" maxlength="20" size="20"
oninput="setText('max-length');" />
</hbox>
<hbox align="center">
<label style="width:10em" value="Password:" />
<textbox id="password" type="password"
oninput="setText('password');" />
</hbox>
<hbox align="center">
<label style="width:10em" value="Multiline:" />
<textbox id="multiline" multiline="true" rows="7" cols="20"
oninput="setText('multiline');" />
</hbox>
<hbox align="center">
<label style="width:10em" value="Input:" />
<description id="result" >
none yet
</description>
</hbox>
</vbox>
</window>