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>
<input type="submit" value="Print" name="submit"
onClick="javascript:window.print('emplapp.asp?id=<%=Session("MM_recordId"%>')"
<b>2) Using Function:</b>
function printjob(){
location.URL=('emplapp.asp?id=<%=Session("MM_recordId"%>');
window.print()}
</script>
Both of these examples required the following in the form tag:
<form name="form1" method="post" action="emplapp.asp?id=<%=Session("MM_recordId"%>')">
All suggestions & ideas are appreciated. Thanks for any help.
KWilliams