|
Q802 Is it possible to open a window, add data to it periodically and keep it hidden until I need it?
irt.org | Knowledge Base | JavaScript | Window | Q802 [ previous next ]
Q802 Is it possible to open a window, add data to it periodically and keep it hidden until I need it?
Yes:
<SCRIPT LANGUAGE="JavaScript"><!--
function update(i) {
now = new Date();
myWindow.document.write(i + ' = ' + now + '<BR>');
}
myWindow = window.open("about:blank","","height=200,width=400")
self.focus();
myWindow.document.open();
for (var i=1; i<10+1; i++) {
setTimeout('update(' + i + ')',i*1000); // update the window every second for 10 seconds
}
setTimeout('myWindow.focus()',12000); // show window after 12 seconds
//--></SCRIPT>
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.