2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / WebCore / manual-tests / modal-dialog.html
blobfe8f128154ee5504d0b972dde53429ac6e015b19
1 <head>
2 <script>
3 function timerFired()
5 document.getElementById("timerResult").firstChild.data = "Timer fired!";
8 function closeModal() {
9 window.returnValue = document.form.toWindow.value;
10 window.close();
13 function init()
15 document.form.fromWindow.value = window.dialogArguments;
17 </script>
18 </head>
19 <body onload="init()">
20 <form name="form">
21 <p>Here is the text from the main window: <input name="fromWindow"></p>
22 <p>Type text here to be sent back to the main window: <input name="toWindow" value="from modal window"></p>
23 <p>Then, push this button: <input type="button" value="Close" onClick="closeModal()"></p>
24 <p>Push this button to test timer: <input type="button" value="Test Timer" onClick="setTimeout(timerFired, 0)"></p>
25 <p id="timerResult">Timer did not fire yet.</p>
26 </form>
27 </body>