Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8182: testcase.html

File testcase.html, 2.7 kB (added by alar, 2 years ago)

Testcase for Element.update of table-related elements

Line 
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <head>
4         <title>test page</title>
5         <script type="text/javascript" src="prototype.js"></script>
6 </head>
7 <body>
8
9 <p>
10         <span id="test1">FOO</span>
11         <br/><button onclick="$('test1').update('BAR')">update SPAN</button>
12 </p>
13
14 <div id="test2">FOO</div>
15 <p>
16         <br/><button onclick="$('test2').update('BAR')">update DIV</button>
17 </p>
18
19 <p id="test3">FOO</p>
20 <p>
21         <br/><button onclick="$('test3').update('BAR')">update P</button>
22 </p>
23
24 <form action="" id="test4"><p>FOO</p></form>
25 <p>
26         <br/><button onclick="$('test4').update('<p>BAR</p>')">update FORM</button>
27 </p>
28
29 <table id="test5">
30         <tr>
31                 <td>
32                         FOO
33                 </td>
34         </tr>
35 </table>
36 <p>
37         <button onclick="$('test5').update('<tr><td>BAR</td></tr>')">update TABLE</button>
38         fails in Konqueror and IE
39 </p>
40
41 <table>
42         <thead id="test6">
43                 <tr>
44                         <td>
45                                 FOO
46                         </td>
47                 </tr>
48         </thead>
49         <tr>
50                 <td>
51                         OTHER
52                 </td>
53         </tr>
54 </table>
55 <p>
56         <button onclick="$('test6').update('<tr><td>BAR</td></tr>')">update THEAD</button>
57         fails in Konqueror
58 </p>
59
60 <table>
61         <thead>
62                 <tr>
63                         <td>
64                                 OTHER
65                         </td>
66                 </tr>
67         </thead>
68         <tfoot id="test7">
69                 <tr>
70                         <td>
71                                 FOO
72                         </td>
73                 </tr>
74         </tfoot>
75         <tr>
76                 <td>
77                         OTHER
78                 </td>
79         </tr>
80 </table>
81 <p>
82         <button onclick="$('test7').update('<tr><td>BAR</td></tr>')">update TFOOT</button>
83         fails in Konqueror and IE
84 </p>
85
86 <table>
87         <tbody>
88                 <tr>
89                         <td>
90                                 OTHER
91                         </td>
92                 </tr>
93         </tbody>
94         <tbody id="test8">
95                 <tr>
96                         <td>
97                                 FOO
98                         </td>
99                 </tr>
100         </tbody>
101         <tbody>
102                 <tr>
103                         <td>
104                                 OTHER
105                         </td>
106                 </tr>
107         </tbody>
108 </table>
109 <p>
110         <button onclick="$('test8').update('<tr><td>BAR</td></tr>')">update TBODY</button>
111         fails in Konqueror
112 </p>
113
114 <table>
115         <tr>
116                 <td>
117                         OTHER
118                 </td>
119         </tr>
120         <tr id="test9">
121                 <td>
122                         FOO
123                 </td>
124         </tr>
125         <tr>
126                 <td>
127                         OTHER
128                 </td>
129         </tr>
130 </table>
131 <p>
132         <button onclick="$('test9').update('<td>BAR</td>')">update TR</button>
133 </p>
134
135 <table>
136         <tr>
137                 <td>
138                         OTHER
139                 </td>
140                 <td>
141                         OTHER
142                 </td>
143                 <td>
144                         OTHER
145                 </td>
146         </tr>
147         <tr>
148                 <td>
149                         OTHER
150                 </td>
151                 <td id="test10">
152                         FOO
153                 </td>
154                 <td>
155                         OTHER
156                 </td>
157         </tr>
158         <tr>
159                 <td>
160                         OTHER
161                 </td>
162                 <td>
163                         OTHER
164                 </td>
165                 <td>
166                         OTHER
167                 </td>
168         </tr>
169 </table>
170 <p>
171         <button onclick="$('test10').update('BAR')">update TD</button>
172 </p>
173
174 <table>
175         <tbody>
176                 <tr>
177                         <td>
178                                 OTHER
179                         </td>
180                         <td>
181                                 OTHER
182                         </td>
183                         <td>
184                                 OTHER
185                         </td>
186                 </tr>
187                 <tr>
188                         <td>
189                                 OTHER
190                         </td>
191                         <td id="test11">
192                                 FOO
193                         </td>
194                         <td>
195                                 OTHER
196                         </td>
197                 </tr>
198                 <tr>
199                         <td>
200                                 OTHER
201                         </td>
202                         <td>
203                                 OTHER
204                         </td>
205                         <td>
206                                 OTHER
207                         </td>
208                 </tr>
209         </tbody>
210 </table>
211 <p>
212         <button onclick="$('test11').update('BAR')">update TD</button>
213 </p>
214 </body>
215 </html>