[whatwg] [html5] window.print() undefined

Olav Junker Kjær olav at olav.dk
Mon Jul 18 13:31:13 PDT 2005

Dean Edwards wrote:
> If I set element.style.display = "block" how do I hide it using a style 
> sheet when it is printed?

I dont think you should set element.style.display to "block", if the 
element should be visible only on screen and not in print. It would be 
better to dynamically assign it a class which is defined in the 
stylesheet to be visible on screen and not in print. (Its a bit tricky 
to add and remove class names, but still cleaner than using print events.)


More information about the whatwg mailing list