[Javascript] enabling print stylesheets on screen

Mike Dougherty mdougherty at pbp.com
Wed Mar 15 12:36:55 CST 2006


how about this:

<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
<link rel="stylesheet" type="text/css" media="print"  href="print.css" />
<link rel="alternate stylesheet" type="text/css" media="screen"  href="print.css" title="Print 
Preview"/>



On Wed, 15 Mar 2006 09:12:00 -0800
  Paul Novitski <paul at novitskisoftware.com> wrote:
> At 08:52 AM 3/15/2006, Steve Clay wrote:
>>I want to dynamically load any print media CSS files as screen files
>>as a sort of emulation of "print preview". I realize I won't be able to
>>affect any @media print {} blocks, but I'm willing to live with that.
> 
> 
> Without testing, I'd guess that if you linked your stylesheets like this:
> 
> <link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
> <link rel="stylesheet" type="text/css" media="print"  href="print.css" />
> 
> ...then you could use JavaScript to modify the media attribute, changing "print" to "screen" and 
>"screen" to "xscreen" (or something else that would be ignored).
> 
> Paul 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 
> 
> __________________________________________________________
> This message was scanned by ATX
> 12:12:36 PM ET - 3/15/2006




More information about the Javascript mailing list