Copied to clipboard

Flag this post as spam?

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


  • Anita Thagaard Kristensen 33 posts 53 karma points
    Sep 02, 2010 @ 16:01
    Anita Thagaard Kristensen
    0

    Scripts into templates

    Hi

    I'm trying to run this code in a template :

    <div id="myContent">
         
    <p>Alternative content</p>
    </div>

    <script type="text/javascript">

    var flashvars = {};
    var params = {};
    var attributes = {};

    if(swfobject.hasFlashPlayerVersion("8.0.0")){
        swfobject
    .embedSWF("untitled.swf", "myContent", "800", "600", "9.0.0","expressInstall.swf", flashvars, params, attributes);
    }
    else {
        window
    .location = "http://umbraco.org";
    }

    </script>

    but it don't work when I use the site, where I put the script.

    Can anyone help me??

    Anita

  • Sascha Wolter 615 posts 1101 karma points
    Sep 09, 2010 @ 23:37
    Sascha Wolter
    0

    Hi Anita,

    is this still an issue?

    If so can you just try to add a

    alert('JS working');

    directly at the beginning of the script to see if it's just an error with the swfobject or if the JS is not working properly.

    From the looks of it I don't see why this shouldn't work apart from the swfobject bit (maybe it's not finding the right files?).

    Cheers,

    Sascha

Please Sign in or register to post replies

Write your reply to:

Draft