layout/xul/grid/examples/javascriptappend.xul

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:6b8bd78b34ad
1 <?xml version="1.0"?>
2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3 - License, v. 2.0. If a copy of the MPL was not distributed with this
4 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
6
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8
9 <!DOCTYPE window>
10
11
12 <window orient="vertical" style="border: 2px solid green"
13 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
14
15 <script>
16 function start()
17 {
18 var row = document.getElementById("row");
19 var text = document.createElement("text");
20 text.setAttribute("value", "foo");
21 row.appendChild(text);
22 }
23
24 </script>
25
26 <hbox>
27 <grid style="border: 2px solid red;" id="grid">
28 <columns>
29 </columns>
30
31 <rows>
32 <row id="row">
33 <button label="value"/>
34 </row>
35 </rows>
36 </grid>
37 <spacer flex="1" style="background-color: white"/>
38 </hbox>
39
40 <button label="insert" oncommand="start()"/>
41
42 </window>

mercurial