< type="button" value="PRINT" onClick="window.open('print.php?id=&sec=&subj=&type=viewrec2&Year=&faci= ','mywindow','width=800,height=800,left=0,top=100,screenX=0,screenY=100')">
when i click this button im being redirected into a new window. the problem is that on the main page where this button is located i want it also to redirect it to the previous page on that the same window how can i do that im using php and javascript?