<BODY onLoad="window.print()">
This example will pop up the printer dialog box when it's loaded into the browser. The intention of this example is for WebSpeed users to create applications that can print HTML documents without browser interaction. </BODY> |
/* startup.w */
<FRAMESET FRAMEBORDER=1 COLS="100%,*"> <FRAME ID="appFrame" SRC="myApp.w" SCROLLING="no"> <FRAME ID="jsFrame" SRC="empty.html" SCROLLING="no" NORESIZE FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0> </FRAMESET> |
/* myApp.w fragment */
<SCRIPT LANGUAGE="JavaScript"> function filePrint() { var newPage = '<PRE>' + document.form1.elements["textarea0"].value; parent.jsFrame.document.write(newPage); parent.jsFrame.document.close(); parent.jsFrame.focus(); parent.jsFrame.print(); } </SCRIPT> |