WebSpeed
Product Update Bulletin
Printing From an HTML Page
This example shows how a Web page can print itself after it finishes loading in the Web browser:
The next example shows how you can print a portion of a page dynamically. First, you must set up two frames, one that takes up the entire browser window and another that is hidden:
The appFrame contains the application. The jsFrame is used for communicating with the server and for running applications like printing.
The following shows the filePrint() function in the simplified myApp.w code fragment:
The filePrint() function copies the value of a <TEXTAREA> field named textarea0 to the hidden frame with a <PRE> prefix. Focus is moved to that frame and then it is printed. If you eliminate the <PRE> prefix, the browser renders the context of textarea0 before it is printed.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |