Coding Help

Soldato
Joined
11 Jul 2004
Posts
16,148
Location
Neptune
Trying to implement a version of this: http://www.bbc.co.uk/glow/docs/1.7/api/glow.widgets.carousel.shtml

On this page: http://www.bbc.co.uk/glow/docs/1.7/furtherinfo/widgets/carousel/ it gives some different variations of how to implement some of the various carousels supported.

I can't get it working! :(

Playing about I have this VERY basic page working, but can someone help me get any of the carousels on that page working? I'm confused. :)

This is the basics page I have working just fine:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>Hello Glow</title>

        <script src="../js/glow/1.7.3/core/core.js" type="text/javascript"></script>
        <script src="../js/glow/1.7.3/widgets/widgets.js" type="text/javascript"></script>
        <link href="../js/glow/1.7.3/widgets/widgets.css" type="text/css" rel="stylesheet" />
        
    <script type="text/javascript">
        glow.ready(function() {
        glow.dom.get("p").css("border", "2px dashed #CCC");
        glow.events.addListener(
                ".salutation",
                "click",
                function () { 
                        alert(glow.dom.get(this).html()); 
                }
        );
});

    </script>

</head>
<body>
    <p class="salutation">Hello,</p>
    <p class="salutation">World</p>
</body>
</html>
 
Yes, I have the libraries locally and they work just fine with the example I posted.

It's the markup and constructor that I must be struggling with I think. I can't work out from their examples what goes where! :)

I've tried 'borrowing' their code but to no avail.
 
screenshot20100505at170.png


The 'Hello World' bit is just fine, as it should be. The rest, as you can see, isn't. Appreciate the help so far.
 
Working a treat now, thanks gord.

The section:
PHP:
<script type="text/javascript" src="http://node1.bbcimg.co.uk/glow/gloader.0.1.3.js">gloader.use("glow", {map: "http://node1.bbcimg.co.uk/glow/glow/map.1.7.3.js"});
</script>

I want the code to point to the JS I have locally on my website. I've changed to:

PHP:
<script type="text/javascript" src="http://node1.bbcimg.co.uk/glow/gloader.0.1.3.js">gloader.use ("glow", {map: "../js/glow/1.7.3/glow/map.1.7.3.js"});
</script>

Works fine. However, if I point the first BBC .js link to the same .js on my domain it doesn't work. Any ideas?
 
Back
Top Bottom