Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Ultimate Fade-in slideshow (v2.4) HELP imagearray error line 38 of fadeslideshow.js

  1. #1
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow (v2.4) HELP imagearray error line 38 of fadeslideshow.js

    1) Ultimate Fade-in slideshow (v2.4)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem: I have been using this script for my slide show for at least a week now and it has been working great up until now. I added more images which I have done previously with no problems, now in Firefox I am getting an error that says (in firebug)

    setting.imagearray[i] is undefined
    [Break on this error] preloadimages[i].src=setting.imagearray[i][0]

    says it is a problem in line 38 or fadeslideshow.js which I never edited.

    PLEASE PLEASE SOMEONE HELP.

    the url is www.civilianaire.com

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,133
    Thanks
    44
    Thanked 3,229 Times in 3,190 Posts
    Blog Entries
    12

    Default

    Extra comma (red) at the end of the highlighted line:

    Code:
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [750, 400], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["images/civilianaire.1.png", "", "", ""],
    		["images/civilianaire.21.png", "", "", ""],
    		["images/civilianaire.25.png", "", "", ""],
    		["images/civilianaire.26.png", "", "", ""],
    		["images/civilianaire.22.png", "", "", ""],
    		["images/civilianaire2.png", "", "", ""],
    		["images/civilianaire.5.png", "", "", ""],
    		["images/civilianaire.18.png", "", "", ""],
    		["images/civilianaire.27.png", "", "", ""],,
    		["images/civilianaire.28.png", "", "", ""],
    		["images/civilianaire.23.png", "", "", ""],
    	    ["images/civilianaire.16.png", "", "", ""],
    		["images/civilianaire.4.png", "", "", ""],
    		["images/civilianaire.9.png", "", "", ""],
    		["images/civilianaire.14.png", "", "", ""],
    		["images/civilianaire.24.png", "", "", ""],
    		["images/civilianaire.6.png", "", "", ""],
    		["images/civilianaire.7.png", "", "", ""],
    		["images/civilianaire.10.png", "", "", ""],
    		["images/civilianaire.17.png", "", "", ""],
    		["images/civilianaire.11.png", "", "", ""],
    		["images/civilianaire.12.png", "", "", ""],
    		["images/civilianaire3.png"] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    Notes: The 'error' reported isn't always where the 'error' is. In this case it's reported where processing the array causes a problem. The array itself is valid, it just happens to contain an unexpected empty entry created by this extra comma.
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much! You're my hero!

  4. #4
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Still not working...for other reasons I think

    Ok so I swear this worked great on all platforms before. But, now it sort of doesnt seem to work in safari or IE Any ideas. Was working great before the comma ordeal.

    Also, is it possible to have too many images in this slide show?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,133
    Thanks
    44
    Thanked 3,229 Times in 3,190 Posts
    Blog Entries
    12

    Default

    It is possible, but you're nowhere near that yet. The problem is that:

    http://www.civilianaire.com/images/civilianaire.1.png

    (civilianaire.1.png) is a 404 not found. IE will not initialize if the first image is missing, possibly not work correctly if any image is missing. But this is the first image, so it won't initialize.

    I see you have a civilianaire1.png in that location, so change this code:

    Code:
    <script type="text/javascript">
    
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [750, 400], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["images/civilianaire.1.png", "", "", ""],
    		["images/civilianaire.8.png", "", "", ""],
    		["images/civilianair
    to:

    Code:
    <script type="text/javascript">
    
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [750, 400], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["images/civilianaire1.png", "", "", ""],
    		["images/civilianaire.8.png", "", "", ""],
    		["images/civilianair
    Or get rid of the highlighted line entirely.

    I'm not sure if that will fix it in Safari, it may. If not, take care of this anyway, and I'll have another look.
    Last edited by jscheuer1; 08-18-2010 at 06:50 PM. Reason: spelling
    - John
    ________________________

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

  6. #6
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks again!

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,133
    Thanks
    44
    Thanked 3,229 Times in 3,190 Posts
    Blog Entries
    12

    Default

    Great! I meant to add though - about too many images - that there is another consideration that goes along with that. It's the byte load of the images. Images for the web should be optimized. I see all of yours are PNG format. Most if not all would be acceptable in JPEG (.jpg) format and could be compressed a lot more that way. Just be careful not to compress them too much so as to lose too much resolution. Keep your PNG ones as backups in case you overdo it with the compression on the JPEG ones.

    Think of it this way - having all those images in the show is nearly the same as having them all right on the page. They will preload incrementally. That's the only advantage. But they still have to load. On slower connections larger (byte size) images take longer to download, so could make the show balky or otherwise odd looking at first until all the images have loaded.
    - John
    ________________________

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

  8. #8
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default can you help with this one.

    <script type="text/javascript">

    var mygallery=new fadeSlideShow({
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    dimensions: [735, 459], //width/height of gallery in pixels. Should reflect dimensions of largest image
    imagearray: [
    ["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/cost_savings.jpg", "QUICK/", "", ""],
    ["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/efficiency.jpg", "QUICK/", "", ""],
    ["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/modularity_home.jpg","QUICK/","",""],
    ["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/environment.jpg","environment/","",""],
    ["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/transparency.jpg", "QUICK/", "", ""]

    ],
    displaymode: {type:'auto', pause:3500, cycles:0, wraparound:false},
    persist: false, //remember last viewed slide and recall within same session?
    fadeduration: 500, //transition duration (milliseconds)
    descreveal: "ondemand",
    togglerid: ""
    })




    </script>

    this works fine in everything but IE..http://hpquickpage.com.au

  9. #9
    Join Date
    Aug 2004
    Posts
    9,910
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    cmaynor, remove the trailing comma (,) following the last image array element (in red):

    Code:
    	imagearray: [
    		["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/cost_savings.jpg", "QUICK/", "", ""],
    		["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/efficiency.jpg", "QUICK/", "", ""],
    		["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/modularity_home.jpg","QUICK/","",""],
    ["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/environment.jpg","environment/","",""],
    		["http://hpquickpagecom.web4.hubspot.com/Portals/46493/images/transparency.jpg", "QUICK/", "", ""], 
    
    ],
    IE is picky about this sort of things.
    DD Admin

  10. #10
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks
    I did see that above. I downloaded page and removed the comma for test on local and still not there in IE but fine in explorer see the code I pasted the comma is removed.

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
  •