faqts : Computers : Programming : Languages : JavaScript : XML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 22 people (73%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How can I print to a client-side printer from a browser? I can create an XML Document with all required print info (i.e. position/content).

Sep 20th, 2001 10:09
Knud van Eeden, Mike Henry,


-------------------------------------------------------------------
--- Knud van Eeden - 20 September 2001 - 21:14 --------------------
If you use JavaScript (e.g. DOM) to access the XML, you can 
use the JavaScript function
 window.print()
possibly in combination with focus(), in order to focus on the 
window which you want to be printed.
e.g. first focus on the 3th window when you are using frames, then 
print the content of that framewindow:
 parent.frames[ 3 ].window.focus();
 window.print();
-------------------------------------------------------------------