blob: 2f8b0ea9eafe87cf9fb637bf834477a1afa0e095 (
plain)
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
|
<html>
<head>
<link href="../themes/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../javascripts/prototype.js"> </script>
<script type="text/javascript" src="../javascripts/window.js"></script>
<script type="text/javascript">
function init() {
var win = new Window('Works', {top:100, left:100, zIndex:150, resizable: true, title: "Body as parent"})
win.setContent("f");
win.show();
var win2 = new Window('Does Not Work', {top:100, left:400, zIndex:150, resizable:true, parent:$('f2'), title: "Specific element as parent"});
win2.setContent("d2");
win2.show();
}
</script>
</head>
<body onload="init()">
<form id="f" name="f" action="http://prototype.conio.net/">
<div id="d">
The form works because it is inside the window content<br />
<input type="text" name="key" value="value" />
<input type="submit" value="Submit" />
</div>
</form>
<form id="f2" name="f2" action="http://blogus.xilinus.com/pages/javawin">
<div id="d2">
The form also work even if it's not inside the window content but the parent's window is the form itself<br />
<input type="text" name="key" value="value" />
<input type="submit" value="Submit" />
</div>
</form>
</body>
</html>
|