|
Posted by Neo Geshel on 03/16/07 00:00
Greetings.
BACKGROUND:
My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are
delivered as application/xhtml+xml for all non-MS web clients, and as
text/xml for all MS web clients (Internet Explorer).
My flash content was originally brought in via the “flash satay” method,
but I have since used some server-side magic do deliver one <object> tag
for IE and another <object> tag for non-IE clients. That way, IE gets
its codebase and classid attributes, which would cause any non-IE client
to ignore the object element entirely.
PROBLEM:
My problem now is with printing. I can’t for the life of me figure out
how to get browsers to IGNORE the object element when printing - so that
they grab the alternative content inside of the object element instead.
You see, inside of my object element is a very nicely formatted header
element (h1 to be exact), and I want this to appear when printing, but
not in any other case. I also want this to appear when the object tag
fails (for example, when someone does not have Flash installed).
I would normally consider using SWFObject, but it does not make use of
standards-compliant JavaScript (it uses document.write), and therefore
will break when pages make use of the application/xhtml+xml mime type.
In addition, it craps out when people fail to have JS turned on, or
whose browsers (cellphones, handhelds) do not make use of JS. My sites
are meant to be fully compatible and accessible! I am not looking to
have content created by JS!
IMPORTANT:
Please understand, I am looking for a way, during printing, for the
printer to ignore the object element itself in favour of the h1 element
that exists inside the object element. This h1 element exists inside the
object element because it is the “graceful degradation” content for
anyone without Flash (or the correct version of Flash). I am not willing
to entertain any other arrangement of elements (or element creation via
JavaScript) unless it is equally as backward-compatible, elegant and
standards-compliant. Preferably, I am looking for a CSS solution.
TIA.
...Geshel
--
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL” (all uppercase).
*********************************************************************
Navigation:
[Reply to this message]
|