Forums

This topic is locked

Print window 2 from window 1???

Posted 16 Jul 2003 16:05:28
1
has voted
16 Jul 2003 16:05:28 Katherine Williams posted:
Hello, and thanks in advance.

I basically want to create a way to print window 2 by using a Submit button on window 1. The

original window 1 is already a popup window, and window 2 just opens up in that same window, which

is fine.

I've tried two options, but they both print window 1. This is what I've tried so far:

<b>1) Using Submit Button:</b>
&lt;input type="submit" value="Print" name="submit"

onClick="javascript:window.print('emplapp.asp?id=&lt;%=Session("MM_recordId"%&gt;')"

<b>2) Using Function:</b>
function printjob(){
location.URL=('emplapp.asp?id=&lt;%=Session("MM_recordId"%&gt;');
window.print()}
&lt;/script&gt;

Both of these examples required the following in the form tag:
&lt;form name="form1" method="post" action="emplapp.asp?id=&lt;%=Session("MM_recordId"%&gt;')"&gt;

All suggestions & ideas are appreciated. Thanks for any help.

KWilliams

Reply to this topic