Ed, 

I'm not sure why you would need to use javacript to change the the media 
attribute. If you just output the both at the same time, the styles with 
media set to screen get applied only on your monitor and while the 
media=print styles are ignored. The reverse is true when you send the page 
to a printer. no need for javascripting at all.

Mariano


[original message below]

This is a creative idea for presentation, and the attribute can be
changed by simple javascript. But, there might be an application
access/security issue with this if this method is used for display of
read-only data, as you are sending an editable version of the form
even though it's hidden. Some browsers allow you to change CSS on the
fly, e.g. firefox with the EditCSS plugin.

-ed

On 9/14/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Here's a solution for you, but I don't know its applicability to 
Firefox,
> and won't work for inline styling.
> 
> 1. Start by outputting the information in a text area and in a div/span.
> 2. Give each different class names/ids, say foo and bar respectivly.
> 3. Link to your stylesheet or declare your style section defining all 
your
> styles EXCEPT for foo and bar.
> 4. Define two more stylesheets or style sections.
> 5. In one use the attribute media="screen"  and within the section do
>         foo { display: inline;}
>         bar{display: none;}
> 6. In the second one do the same thing but reverse the display 
properties.
> 
> 
> 
> Mariano
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to