Ticket #4782: test4782.html

File test4782.html, 1.2 kB (added by doughays, 10 months ago)

test html file with complex margins/border/padding demonstrating patched dojo.coords function

Line 
1<html>
2<head>
3<title>4782</title>
4<script type='text/javascript'
5        djConfig=' isDebug: false, usePlainJson: true' src='dojo/dojo.js'></script>
6<script type='text/javascript'>
7dojo.addOnLoad(function init() {
8        window.frames["frm"].document.write(
9                "<html><body>text in iframe<br>"+
10                "<div id='insideFrame' style='border:5px solid pink;width:300px;height:200px;'>"+
11                        "pink border should be completely obscured"+
12                "</div>"+
13                "after node</body></html>"
14        );
15        var id = window.frames["frm"].document.getElementById('insideFrame');
16        var c = dojo.coords(id, true, true);
17        var testDiv = dojo.byId('test');
18        testDiv.style.left = c["x"]+"px";
19        testDiv.style.top = c["y"]+"px";
20        testDiv.style.visibility = "visible";
21});
22</script>
23</head>
24<body class="tundra">
25        main document
26        <div style="position:absolute;left:150px;top:50px;border:10px solid red;padding:10px;">
27        <iframe name="frm" id="frm" width="400" height="300" border="0" frameborder="0"
28                scrolling="yes" style="margin:15px;padding:10px;border:10px solid black;">
29        </iframe>
30        </div>
31        <div id="test" style='visibility:hidden;position:absolute;border:5px solid black;width:300px;height:200px;'
32                >pink border should be completely obscured</div>
33</body>
34</html>