OLD | NEW |
---|---|
(Empty) | |
1 <!doctype html> | |
2 <!-- | |
3 @MAC-DENY:title* | |
4 @MAC-DENY:value* | |
5 @MAC-ALLOW:position* | |
6 @MAC-ALLOW:size* | |
7 | |
8 @WIN-DENY:title* | |
9 @WIN-ALLOW:location* | |
10 @WIN-ALLOW:size* | |
11 --> | |
12 <html> | |
13 <head> | |
14 </head> | |
15 <body style="margin: 0; padding: 0;"> | |
16 | |
17 <div style="width: 300px; height: 100px;"> | |
18 <button style="margin: 20px; border: 0; width: 260px; height: 60px"> | |
19 Button | |
20 </button> | |
21 </div> | |
22 | |
23 <div style="width: 300px; height: 100px;"> | |
24 <button style="margin: 20px; border: 0; width: 260px; height: 60px"> | |
25 Button | |
26 </button> | |
27 </div> | |
28 | |
29 <div> | |
30 <iframe id="frame1" style="border: 0; width: 300px; height: 100px;"> | |
31 </iframe> | |
32 </div> | |
33 | |
34 <div> | |
35 <iframe id="frame2" style="border: 0; width: 150px; height: 50px;"> | |
aboxhall
2013/01/29 01:52:40
Why is this iframe half the size of everything els
dmazzoni
2013/01/29 16:51:50
It's deliberately scrolled also (see below) - so w
aboxhall
2013/01/29 17:43:26
Right, I somehow forgot that it has to be smaller
| |
36 </iframe> | |
37 </div> | |
38 | |
39 <script> | |
40 var frameCode = | |
41 '<body style="margin: 0; padding: 0;">\n' + | |
42 '<div style="width: 300px; height: 100px;">\n' + | |
43 ' <button style="margin: 20px; border: 0; width: 260px; height: 60px">\n' + | |
44 ' Button\n' + | |
45 ' </button>\n' + | |
46 '</div>\n' + | |
47 '</body>\n'; | |
48 | |
49 function writeFrameCode(frame) { | |
50 var doc = frame.contentWindow.document; | |
51 doc.open(); | |
52 doc.write(frameCode); | |
53 doc.close(); | |
54 } | |
55 | |
56 var frame1 = document.getElementById('frame1'); | |
57 writeFrameCode(frame1); | |
58 | |
59 var frame2 = document.getElementById('frame2'); | |
60 writeFrameCode(frame2); | |
61 frame2.contentWindow.scrollTo(150, 50); | |
62 </script> | |
63 | |
64 </body> | |
65 </html> | |
OLD | NEW |