Results 1 to 7 of 7

Thread: Background Image Carousel won't load stuck on black background

  1. #1
    Join Date
    Oct 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Background Image Carousel won't load stuck on black background

    1) Script Title: Background Image Carousel

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

    3) Describe problem: The script will not load, and is stuck on the black background:

    accessotronik.com/

    Thank you for your help!
    Last edited by jscheuer1; 10-12-2012 at 06:07 PM. Reason: Format

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    There could also be other problems but:

    accessotronik.com/bgcarousel.js

    is a 404 Not Found.

    Oh yeah, there is another problem here (missing comma - added in red):

    Code:
    <script type="text/javascript">
    
    var firstbgcarousel=new bgCarousel({
    	wrapperid: 'mybgcarousel', //ID of blank DIV on page to house carousel
    	imagearray: [
    		['http://www.accessotronik.com/v/vspfiles/slideshow/solderstation2.jpg', ''],
    		['http://www.accessotronik.com/v/vspfiles/slideshow/ATRIX.jpg', ''],
    		['http://www.accessotronik.com/v/vspfiles/slideshow/bwcases.jpg', ''],
    		['http://www.accessotronik.com/v/vspfiles/slideshow/dymo2.jpg', ''] //<--no trailing comma after very last image element!
    	],
    linkarray: [
    		'http://www.accessotronik.com/Soldering_Rework_System_s/292.htm',
    		'https://www.accessotronik.com/Atrix_promo_s/1187.htm',
    		'http://www.accessotronik.com/B_W_International_s/810.htm',
    		'http://www.accessotronik.com/Articles.asp?ID=259'
    	],
    	displaymode: {type:'auto', pause:3000, cycles:2, stoponclick:false, pauseonmouseover:true},
    	navbuttons: ['http://www.accessotronik.com/v/vspfiles/slideshow/left.gif', 'http://www.accessotronik.com/v/vspfiles/slideshow/right.gif', 'http://www.accessotronik.com/v/vspfiles/slideshow/up.gif', 'http://www.accessotronik.com/v/vspfiles/slideshow/down.gif'], // path to nav images
    	activeslideclass: 'selectedslide', // CSS class that gets added to currently shown DIV slide
    	orientation: 'h', //Valid values: "h" or "v"
    	persist: true, //remember last viewed slide and recall within same session?
    	slideduration: 500 //transition duration (milliseconds)
    })
    
    </script>
    And there still could be yet other problems.
    - John
    ________________________

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

  3. #3
    Join Date
    Oct 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi John,

    Thank you for your quick reply. i forgot to change the link to my JS file in the code, i have fixed my loading error.


    I now have the error : Error: DIV with ID "mybgcarousel" not found on page.

    Any idea why?

    Thank you!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    I'm not getting that on:

    accessotronik.com/Default.asp

    In fact, the slideshow is working. Is there some other page? Perhaps you fixed it.

    If not, make sure to clear the browser cache and reload the page.
    - John
    ________________________

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

  5. #5
    Join Date
    Oct 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    It is once you click on the link from the slideshow, when the other page load, you will receive the message Error: DIV with ID "mybgcarousel" not found on page.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    That's because you have the scripts on a page that doesn't have that div. What you should do is either not have the scripts on that page, that's if you don't want the carousel on that page, or put the div on that page and as long as the paths to the images and css are valid, it can have the carousel too. But the problem might be your CMS. If you cannot leave the scripts off of that other page, and you don't want the carousel on it, you can modify the bgcarousel.js script. Using a text only editor like NotePad, add the red comment token to the highlighted line as shown:

    Code:
    	init:function($, slidesHTML){
    		var slideshow=this, setting=this.setting
    		this.$wrapperdiv=$('#'+setting.wrapperid)
    		setting.dimensions=[this.$wrapperdiv.width(), this.$wrapperdiv.height()]
    		this.$wrapperdiv.css({position:'relative', visibility:'visible', overflow:'hidden', backgroundImage:'none', width:setting.dimensions[0], height:setting.dimensions[1]}) //main DIV
    		if (this.$wrapperdiv.length==0){ //if no wrapper DIV found
    			//alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
    			return
    		}
    		this.$wrapperdiv.html(slidesHTML)
    		this.$imageslides=this.$wrapp . . .
    That way, even if the script is on a page without the required div, it will exit gracefully with no alert.

    The browser cache may need to be cleared and/or the page(s) refreshed to see changes.
    - John
    ________________________

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

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

    accessotronik (10-15-2012)

  8. #7
    Join Date
    Oct 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Great, thank you for taking the time to explain the problem and sharing your knowledge.

    I modified the JS script and turned the alert into a comment, Problem solved!

    Many thanks!

Similar Threads

  1. background image carousel
    By akluch2 in forum JavaScript
    Replies: 1
    Last Post: 08-07-2012, 11:07 PM
  2. Background Image Carousel
    By WillyBear in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 07-26-2012, 07:44 PM
  3. Resolved Background Image Carousel - help!
    By blumuse in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 04-20-2012, 07:52 PM
  4. Background Image Carousel background-size: cover; is not working
    By kerriluo in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-12-2012, 09:38 PM
  5. Background image stuck in Facebox
    By ldybug1752 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 10-06-2009, 02:52 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
  •