Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] enabling print stylesheets on screen


  • From: mdougherty at pbp.com (Mike Dougherty)
  • Subject: [Javascript] enabling print stylesheets on screen
  • Date: Wed Mar 15 12:34:31 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@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 
> 
> __________________________________________________________
> This message was scanned by ATX
> 12:12:36 PM ET - 3/15/2006