Has anyone found a way to access the media object of a browser, if one should exist? I have a javascript that executes onload which detects the screen size and resizes a div to take up 100% (minus the height of the headers and footers) of the user’s screen and scrolls appropriately, simulating frames.
The problem is that in FF, when the user prints, they only get the visible portions because I’m unable to deactivate the JS on printing. Is there a way to specify media in a script tag, like
[CODE]<script type=”text/javascript” media=”print”>
or accessing a media property inside it, like this?
[CODE]if (window.media == “print”)
Unfortunately, since the height is decided by javascript, I’m unable to use the media property of a link tag to a css file. The javascript overrides it. If I try to reset the height into “auto” then I get worse results. So I’d rather just disable the functions that resize the table when printing.
Thanks for your time!