BipadTaranMahato / slideshow

Automatically exported from code.google.com/p/slideshow
0 stars 0 forks source link

myShow.go(n); sequencing error #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. "This is the script I use to pass variables between html pages."
    <script type="text/javascript">
         function getValue(varname)
    {
      //this is for testing only otherwise = window.location.href;
      var url = "http://www.slideshow.html?31";
        var qparts = url.split("?");        
    value = qparts[1];
      return value;
    }   
    </script> 

2. Add getValue to retrieve value 
    <script type="text/javascript">     
    //<![CDATA[
      window.addEvent('domready', function(){
        var data = {
            'image0.jpg': {},
                'image1.jpg': {},
    var myShow = new Slideshow('show', data, { captions: false, 
controller: false, height: 466, hu: 'images/School/', width: 700 });
        var pagenum = getValue(); 
        myShow.go(pagenum); 
      });
    //]]>
    </script>

What is the expected output? What do you see instead?

My webpage passes a variable between html pages to tell the slideshow 
where to start.  The variable is passes and the correct initial image 
loads but the second image does not follow the expected sequence. I 
suspect this is due to the value returned (ie. "31" en lieu of a clean # 
31).  I'm just tickering around with javascript but I am no expert and I 
don't know how to return a value which "slideshow.js" can use.

What version of the product are you using? IE 7. On what operating system 
and browser? Vista

Please provide any additional information below.

Original issue reported on code.google.com by stanf...@notanotherpicture.com on 19 Mar 2009 at 4:55

GoogleCodeExporter commented 9 years ago
In your function you can always try:

value = qparts[1].toInt();

However, this work has already been done for you. Check out the "match" option 
in the wiki:

http://code.google.com/p/slideshow/wiki/Slideshow#Options:

If you have other troubleshooting questions please post them to the Google 
Group:

http://groups.google.com/group/mootools-slideshow

Original comment by aeron.gl...@gmail.com on 19 Mar 2009 at 9:41