You are here: irt.org | FAQ | JavaScript | Document | Q989 [ previous next ]
Try:
<script language="JavaScript"><!-- var windowHandle = ''; function openWindow() { windowHandle = window.open('about:blank','windowName','width=400,height=400'); // alternatively use: window.open('blank.htm',...) setTimeout('updateWindow()',2000); } function updateWindow() { windowHandle.document.open(); windowHandle.document.write('<HTML><HEAD><TITLE>Hello World<\/TITLE><\/HEAD><BODY><H1>Hello World<\/H1><\/BODY><\/HTML>'); windowHandle.document.close(); } //--></script> <form> <input type="button" onClick="openWindow()" value="Open Window"> </form>