function printpage($auto=1,$timeout=10000) { if ($auto == 1) { echo " < script language="javascript" > < !-- begin if (window.print) { window.print(); } else { alert('no printer driver in your pc'); } // end -- > < /script > n"; } else { echo " < script language="javascript" >
< !-- begin if (window.print) { settimeout('printcheck()','$timeout'); } else { alert('no printer driver in your pc'); } function printcheck() { agree = confirm('ok to print now?'); if (agree) window.print(); } // end -- > < /script > n"; } }