[thelist] document.write() into a pop-up window

Peter-Paul Koch gassinaumasis at hotmail.com
Tue Jan 9 10:18:26 CST 2001


>I have once seen a JavaScript example that opened a window with
>window.open() without actually calling any URL and used document.write() (I
>think) to write a full HTML document directly into the newly opened window.

var newwin = window.open('','','width=200,height=400');
newwin.document.write('<HTML><HEAD><TITLE>This is the 
title</TITLE></HEAD>');
newwin.document.write('<BODY><P>This is a P!</P></BODY></HTML');
newwin.document.close()

ppk
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the thelist mailing list