You are here: irt.org | FAQ | JavaScript | Window | Q665 [ previous next ]
Try:
<SCRIPT LANGUAGE="JavaScript"><!-- imagename = ''; function enlrge(imgnme) { lrgewin = window.open("about:blank","","height=200,width=400") imagename = imgnme; setTimeout('update()',500) } function update() { doc = lrgewin.document; doc.open('text/html'); doc.write('<HTML><HEAD><TITLE>Enlarged Image<\/TITLE><\/HEAD><BODY bgcolor="white">'); doc.write('<IMG SRC="' + imagename + '">'); doc.write('<form name="viewn"><input type="button" value="Close Window" onClick="self.close()"><\/form><\/BODY><\/HTML>'); doc.close(); } enlrge('test.gif'); //--></SCRIPT>