views:

14

answers:

1

How can I print a single dom element (such as table) or whole window dom object using java script in internet explorer, ff etc...?

+1  A: 

You cannot envoke printing from JS alone. JS does not have the right permission to print directly from the browser.

Two appraches are: 1. Print CSS (a stylesheet that tells your browser how to create the file when printed) 2. Print link - a link that will only show the information needed for printing, will strip everything else out.

franky b
Print CSS is the way to go. http://www.w3.org/TR/CSS2/media.html
jeffamaphone