[thelist] hiding an HTML attribute with IE-condition?

Zhang Weiwu zhangweiwu at realss.com
Thu Aug 19 08:52:13 CDT 2010

Short question: is there a hack that a certain HTML attribute should not
be recognized by IE but by most other browsers? I know how to hide an
element (IE conditional comment), how to hide a CSS definition (hacks),
but how to hide a single attribute is not clear.

Long question:

When embedding a video using <object>, to use data="video.wmv" or not,
is a question.

   1. Using it, IE with Windows Media Player would start playback the
      video only after its fully downloaded, leaving user an WHITE EMPTY
      space to wait. Firefox users on Linux are lucky because their
      player always show up the video control before download the video.
   2. Not using it, but to use <parameter src="video.wmv"> as
      recommended by Microsoft, then this parameter is only recognized
      by Windows Media Player. On Linux, where "Windows Media Player"
      doesn't exist, the media player (default Totem) will not play the
      file, because it would ignore the parameter. I only know it
      recognizes data="..." attribute as recommended by W3C.

The dilemmas can be solved if I can conditionally hide data="video.wmv"

I can hide it with php or javascript but wish to fall back to them only
when absolutely necessary.

Thanks in advance!

Best regards.

More information about the thelist mailing list