5 document
.getElementById("timerResult").firstChild
.data
= "Timer fired!";
8 function closeModal() {
9 window
.returnValue
= document
.form
.toWindow
.value
;
15 document
.form
.fromWindow
.value
= window
.dialogArguments
;
19 <body onload=
"init()">
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>