Line | |
---|
1 | <html> |
---|
2 | <head> |
---|
3 | <link href="../themes/default.css" rel="stylesheet" type="text/css" /> |
---|
4 | <script type="text/javascript" src="../javascripts/prototype.js"> </script> |
---|
5 | <script type="text/javascript" src="../javascripts/window.js"></script> |
---|
6 | <script type="text/javascript"> |
---|
7 | function init() { |
---|
8 | var win = new Window('Works', {top:100, left:100, zIndex:150, resizable: true, title: "Body as parent"}) |
---|
9 | win.setContent("f"); |
---|
10 | win.show(); |
---|
11 | |
---|
12 | var win2 = new Window('Does Not Work', {top:100, left:400, zIndex:150, resizable:true, parent:$('f2'), title: "Specific element as parent"}); |
---|
13 | win2.setContent("d2"); |
---|
14 | win2.show(); |
---|
15 | } |
---|
16 | </script> |
---|
17 | </head> |
---|
18 | <body onload="init()"> |
---|
19 | <form id="f" name="f" action="http://prototype.conio.net/"> |
---|
20 | <div id="d"> |
---|
21 | The form works because it is inside the window content<br /> |
---|
22 | <input type="text" name="key" value="value" /> |
---|
23 | <input type="submit" value="Submit" /> |
---|
24 | </div> |
---|
25 | </form> |
---|
26 | |
---|
27 | <form id="f2" name="f2" action="http://blogus.xilinus.com/pages/javawin"> |
---|
28 | <div id="d2"> |
---|
29 | The form also work even if it's not inside the window content but the parent's window is the form itself<br /> |
---|
30 | <input type="text" name="key" value="value" /> |
---|
31 | <input type="submit" value="Submit" /> |
---|
32 | </div> |
---|
33 | </form> |
---|
34 | </body> |
---|
35 | </html> |
---|
36 | |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.