I am having a problem with window.print in a popup window.
I am creating 2 popup windows both with a print button in them, 1
works the other doesn't. Code runs in a javascript function on a
webpage. Here is the difference :
First example (works) -
mywinman=window.open('t&cs.htm','win2','toolbar=no ,location=no,directories=no,status=no,menubar=no,s crollbars=yes,resizable=no,width=600,height=500,le ft=100,top=100');
htm file contains this button -
<INPUT type='button' value='Print' OnClick='window.print()'>
Second example (no errors but nothing happens) -
mywin=window.open('','win1','toolbar=no,location=n o,directories=no,status=no,menubar=no,scrollbars=y es,resizable=no,width=550,height=600,left=50,top=5 0');
content created using document write in a loop as follows :
mywin.document.write(html_line [i]);
code is in the line eg.
html_line [idx] = "<INPUT type='button' value='Print'
OnClick='window.print()'>";
It seems that somehow I am not specifying the window correctly
although I have tried various combinations.
I am sure it is something stupid as usual. Thanks in advance.
John