|If you are designing forms for browsers and including frames, you may wish to add a button that the user can click on to print the current frame.|
The following piece of code allows you to do this by simulating the Netscape or Internet Explorer function to print the selected frame:
self.print(); return false
Naturally you could replace the text with a graphic. This function only works with Netscape Communicator 4.0 and Internet Explorer 4.0 onwards.
Another option is to use the window.print method. This method prints the window which in a frames format would print more than the customer might be expecting.
<a href="#" onClick="window.print();return false">
window.print(); return false