Ticket #2257 (closed defect: worksforme)

Opened 2 years ago

Last modified 22 months ago

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"

"http://www.w3.org/TR/html4/strict.dtd">

<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>

Attachments

test_SlideShow.html (0.9 kB) - added by guest 2 years ago.
The test case

Change History

Changed 2 years ago by guest

The test case

Changed 2 years ago by nicola.rizzo+dojo@…

It works if you write transitionInterval:700 in your constructor instead of transitionInterval:'700', because this.transitionInterval is an Integer.
Bye!

Nicola

Changed 2 years ago by craig dunn (original issue poster)

Confirmed that changing this parameter works. I can see how the width and height params might need to be strings (to account for "px" or "%" dimensions), but wouldn't there be the same issue with the delay param? It seems to work fine as a stringified argument. Just a thought. From my perspective, I consider the matter resolved.

Changed 22 months ago by dylan

  • status changed from new to closed
  • resolution set to worksforme
  • milestone set to 0.9
Note: See TracTickets for help on using tickets.