C
Craig
First of all, this one is driving me crazy, so thanks in advance for any
help!!
I've got a javascript function in a parent document that generates an HTML
document on the fly when a button is clicked... that generated popup
contains a button that's supposed to print the contents of the popup window
(self). However, the button won't print (nothing happens on click) from the
newly generated popup to print the contents of the window... the complete
source for the generated page is below, I've tried every combination I can
think of, but absolutely nothing happens when I click the button... I tried
the right-click print from the context menu, and everything comes up... so,
the issue's in code somewhere! argh!
<HTML>
<HEAD>
<TITLE>Generated 2/19/2004 at 14:18</TITLE>
</HEAD>
<BODY bgcolor='#FFFFFF' text='#000000' style='margin: 0em'>
<DIV ALIGN='center'>
<IMG SRC=graphs/ChartPic_000001.jpeg width=600 height=300>
<form>
<input type=button value="Print Document" onclick="window.print()">
</form>
</DIV>
</BODY>
</HTML>
...and just in case someone is interested in the code that generates this
window in the parent page... it's below...
<!-- Begin
function popUp(URL,TITLE,IMGWIDTH,IMGHEIGHT,WINWIDTH,WINHEIGHT) {
day = new Date();
id = day.getTime();
dateTime = day.getMonth()+1 +'/'+ day.getDate() +'/'+ day.getFullYear() +'
at '+ day.getHours() +':'+ day.getMinutes();
eval("newWindow = window.open('','"+ id
+"','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,wid
th=" +WINWIDTH+ ",height=" +WINHEIGHT+ "')");
newWindow.document.write("<HTML><HEAD><TITLE>Generated "+ dateTime
+"</TITLE></HEAD><BODY bgcolor='#FFFFFF' text='#000000' style='margin:
0em'><DIV ALIGN='center'><IMG SRC=" +URL+ " width=" +IMGWIDTH+ " height="
+IMGHEIGHT+ "><form><input type=button value=\"Print Document\"
onclick=\"window.print()\"></form></DIV></BODY></HTML>")
newWindow.document.close
}
//-->
</SCRIPT>
help!!
I've got a javascript function in a parent document that generates an HTML
document on the fly when a button is clicked... that generated popup
contains a button that's supposed to print the contents of the popup window
(self). However, the button won't print (nothing happens on click) from the
newly generated popup to print the contents of the window... the complete
source for the generated page is below, I've tried every combination I can
think of, but absolutely nothing happens when I click the button... I tried
the right-click print from the context menu, and everything comes up... so,
the issue's in code somewhere! argh!
<HTML>
<HEAD>
<TITLE>Generated 2/19/2004 at 14:18</TITLE>
</HEAD>
<BODY bgcolor='#FFFFFF' text='#000000' style='margin: 0em'>
<DIV ALIGN='center'>
<IMG SRC=graphs/ChartPic_000001.jpeg width=600 height=300>
<form>
<input type=button value="Print Document" onclick="window.print()">
</form>
</DIV>
</BODY>
</HTML>
...and just in case someone is interested in the code that generates this
window in the parent page... it's below...
<!-- Begin
function popUp(URL,TITLE,IMGWIDTH,IMGHEIGHT,WINWIDTH,WINHEIGHT) {
day = new Date();
id = day.getTime();
dateTime = day.getMonth()+1 +'/'+ day.getDate() +'/'+ day.getFullYear() +'
at '+ day.getHours() +':'+ day.getMinutes();
eval("newWindow = window.open('','"+ id
+"','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,wid
th=" +WINWIDTH+ ",height=" +WINHEIGHT+ "')");
newWindow.document.write("<HTML><HEAD><TITLE>Generated "+ dateTime
+"</TITLE></HEAD><BODY bgcolor='#FFFFFF' text='#000000' style='margin:
0em'><DIV ALIGN='center'><IMG SRC=" +URL+ " width=" +IMGWIDTH+ " height="
+IMGHEIGHT+ "><form><input type=button value=\"Print Document\"
onclick=\"window.print()\"></form></DIV></BODY></HTML>")
newWindow.document.close
}
//-->
</SCRIPT>