I have a main window that creates a new window called printWin (which
contains the printable format of the page). From the main window I
embed a javascript in the printWin window that calls the
"window.print() " function. So it looks like this:
printWin.docume nt.write ("<FORM>");
printWin.docume nt.write ("<INPUT TYPE=\"BUTTON\" NAME=\"btnPrint \"
VALUE=\"Print\" ONCLICK=\"javas cript:window.pr int()\">");
printWin.docume nt.write ("</FORM>");
But this has absolutely no effect when clicked. I tried printing out
the window name, but it was blank. I dont know why that is. Maybe its
coz I'm dynamically creating the new window? BTW, if its of any
relevance, I copy the body of the main window into printWin and then
make some changes to it (basicallly convert all text boxes into text).
Any ideas?
contains the printable format of the page). From the main window I
embed a javascript in the printWin window that calls the
"window.print() " function. So it looks like this:
printWin.docume nt.write ("<FORM>");
printWin.docume nt.write ("<INPUT TYPE=\"BUTTON\" NAME=\"btnPrint \"
VALUE=\"Print\" ONCLICK=\"javas cript:window.pr int()\">");
printWin.docume nt.write ("</FORM>");
But this has absolutely no effect when clicked. I tried printing out
the window name, but it was blank. I dont know why that is. Maybe its
coz I'm dynamically creating the new window? BTW, if its of any
relevance, I copy the body of the main window into printWin and then
make some changes to it (basicallly convert all text boxes into text).
Any ideas?
Comment