Ticket #2257 (closed defect: worksforme)
Slideshow does not function when instantiated using createWidget
| Reported by: | guest | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | Widgets | Version: | 0.4.1 |
| Severity: | major | Keywords: | |
| Cc: |
Description
I am trying to use the createWidget javascript function with the SlideShow? widget so I can dynamically change content. The first image loads and then… nothing. Trying to toggle the play/pause does nothing. Simplified reproduction test case below. By the way, the same parameters used with a hardcoded tag work properly.
===================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
<html>
<head>
<title>Slideshow Widget Demo</title>
<script type="text/javascript"> var djConfig = {isDebug: true}; </script>
<script type="text/javascript" src="js/dojo.js"></script>
<script language="JavaScript?" type="text/javascript">
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.SlideShow?");
</script>
<style>
html, body {
height: 100%; width: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<div id="testSS">
<script type="text/javascript">
dojo.widget.createWidget("SlideShow?",
{id:"ss1",imgUrlBase:"images/",imgUrls:["1.jpg","2.jpg","3.jpg"," 4.jpg"],transitionInterval:'700',src:"1.jpg",delay:'3000',imgWidth:'480',imgHeight:'250'}, document.getElementById("testSS"));
</script>
</div>
</body>
</html>