Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sherry Ann Hernandez 320 posts 344 karma points
    Dec 08, 2010 @ 06:29
    Sherry Ann Hernandez
    0

    is there a way to put alternative flash object in xslt

    Hi Guys,

    I'm trying to to embed a flash video in our site. It turns out the param object is not working with the other browser. So I try to use this code

    <!--[if !IE]>-->
           <object type="application/x-shockwave-flash" data="{$virtual/umbracoFile}" width="500" height="400">
          <!--<![endif]-->
          <!--[if !IE]>-->
           </object>
          <!--<![endif]-->

    but then my page displays differently whenever I try to insert this code. Is there another way of doing it?

     

    Thanks,

    Sherry

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Dec 08, 2010 @ 08:56
    Chriztian Steinmeier
    0

    Hi Sherry,

    Yes, you can do that - you just have to know how to generate comments in the output (regular comments in an XSLT file will just be ignored as they are, well, comments :-)

    You can do this:

       <xsl:comment><![CDATA[[if !IE]>]]></xsl:comment>
            <object type="application/x-shockwave-flash" data="{$virtual/umbracoFile}" width="500" height="400">
        <xsl:comment><![CDATA[<![endif]]]></xsl:comment>
        <xsl:comment><![CDATA[[if !IE]>]]></xsl:comment>
            </object>
        <xsl:comment><![CDATA[<![endif]]]></xsl:comment>
    
    (Unfortunately, the CDATA Sections don't add to the readability of it, but they free you from having to escape the less-than characters in the comments) 

    /Chriztian

     

  • Sherry Ann Hernandez 320 posts 344 karma points
    Dec 08, 2010 @ 09:12
    Sherry Ann Hernandez
    0

    Thanks christian. It's now working. :D

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies