Results 1 to 5 of 5

Thread: Swiss Army Slide Show won't advance manually in Chrome Browser

  1. #1
    Join Date
    Feb 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Swiss Army Slide Show won't advance manually in Chrome Browser

    Individual slides have link to html page on webserver. Show is manual and configured as shown on the examples in slideshow 3. Moving through the slide show using the next and previous arrows works in IE and Firefox but not Chrome.

    A specific line in the slides definition looks like this :
    slides[6] = ["/drpano/jpg/FMM_Previous.jpg", "", "/drpano html/DrPanoBuyFMM.html"];

    This works fine in IE and Firefox but not Chrome. The Chrome browser throws this error:
    Uncaught SyntaxError: Unexpected number swissarmy.js:199
    inter_slide.populateslide swissarmy.js:199
    inter_slide.changeimg swissarmy.js:304
    onclick DrPanoViewPrevious.html:114

    Removing the second argument, "" , from the slides definition allows all browsers to cycle through the show but the individual slide link does not work in any browser. I probably have missed the simple or obvious way to get this to work in Chrome. Any help is greatly appreciated.

    Thanks,

    George Traeber

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    It could be something you're doing, or the script might need an update. Chrome did not exist when the script was written. However the demo page's example 3 works fine in Chrome here. To tell what the problem is I would need a link to the page:

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the quick reply, here's a link to the problem page:

    http://www.drpano.com/DrPanoViewPrevious.html

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    This (red in the highlighted section) is invalid javascript code (from the page's source code):

    Code:
     . . . se_title=1; //use for descriptions as images title attributes
    slides.nofade=1; //use for no fade-in, fade-out effect for this show
    slides_border_style='ridge';
    slides.border=5; //set border width for images
    slides.border_color='#E4D6BB'; //set border color for images
    slides.onclick="window.open(this.1,this.2,'top=0,left=0,width=+screen.availWidth+,height='+screen.availHeight');return false;"
    
    </script>
    
    <script src="/drpano/js/swissarmy.js" type="text/javascript">
    
    /***********************************************
    * Swiss Army Image slide show script  - John Davenport Scheuer: http://home.comcast.net/~jscheuer1/
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynam . . .
    Other browsers just go with 'undefined' for those values. But technically speaking there's no this.1 or this.2, and even if there were, they should be expressed as this[1] and this[2]. Chrome gets excited about it and stops processing the rest of the script. Why it doesn't do that sooner, I'm not sure. But it does do it and does it as soon as you try to go to the next or previous slide from second slide.

    OK, so do you want it to open a new window? Right now other browsers are looking at that, and when you click on it they're ignoring it because it's an error, and they're just taking you to the page. If that's what you want, just get rid of the whole line, so you would have:

    Code:
     . . . se_title=1; //use for descriptions as images title attributes
    slides.nofade=1; //use for no fade-in, fade-out effect for this show
    slides_border_style='ridge';
    slides.border=5; //set border width for images
    slides.border_color='#E4D6BB'; //set border color for images
    
    
    </script>
    
    <script src="/drpano/js/swissarmy.js" type="text/javascript">
    
    /***********************************************
    * Swiss Army Image slide show script  -  John Davenport Scheuer: http://home.comcast.net/~jscheuer1/
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynam . . .
    If you want a new window, with those coordinates (top of the screen and left of the screen) and those dimensions (all of the available screen width, and all the available screen height), then use:

    Code:
    slides.onclick="window.open(this.href,'_new','top=0, left=0, width='+screen.availWidth+', height='+screen.availHeight);return false;";
    If it were me, I'd just get rid of the line, or possibly use a new window, but a smaller one, like:

    Code:
    slides.onclick="window.open(this.href,'_new','top=50, left=50, scrollbars, resizable, width='+(screen.availWidth/1.5)+', height='+(screen.availHeight/1.5));return false;";
    Last edited by jscheuer1; 02-27-2013 at 09:17 PM. Reason: fix typos in last two code blocks
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    gtraeber (02-27-2013)

  6. #5
    Join Date
    Feb 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    John;

    Thanks for your effort on my problem. I would have probably looked forever and never realized my mistake. Removed the line completely and Chrome is now working properly.

    Again, Thanks

    George Traeber

Similar Threads

  1. Problem With Swiss Army Slide Show
    By mvfaccin in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 07-08-2008, 11:01 PM
  2. Slide show - SWISS ARMY
    By Alex Evans in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 12-03-2007, 08:21 AM
  3. Swiss Army Slide Show - Center
    By Kylegar in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 06-27-2007, 09:35 PM
  4. Swiss Army Slide Show (Two Shows)
    By IsItWrong in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 05-21-2007, 10:58 PM
  5. no buttons on swiss army slide show
    By regulatorjohnson in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 03-15-2007, 04:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •