i would like to popup a window and document.write with javaScript. The following works fine on FF, Safari, NS, both on Mac and PC, but fails in IE (6 and 7 as far as i know). it opens a new window in IE, but it doesn't write anything. not even title. any suggestion? paramaters are Pic = 'pic1.jpg' wVal = 500 hVal = 500 Name= 'nw_one' pTitle= 'picture 1' (new window opens in 500 x500.) (this is written in xsl, i don't think it matters. ) <script language="JavaScript"> <![CDATA[ function image(Pic,wVal,hVal,pTitle,Name){ subWin = window.open("",Name,"width="+ wVal + ",height=" + hVal +",top=0,left=0"); subWin.document.open(); subWin.document.write('<html><head><title>'+pTitle+'</title>'); subWin.document.write('</head><body background="'+ Pic +'">'); subWin.document.write('</body></html>'); subWin.document.close(); subWin.focus(); } ]]> </script> HTML: thanx or your help.
If you're passing the parameters in the order stated, it won't accept a space in the Name parameter. Can you check that?