Results 1 to 5 of 5

Thread: Error: DIV with ID "mybgcarousel" not found on page.

  1. #1
    Join Date
    Sep 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Error: DIV with ID "mybgcarousel" not found on page.

    1) Script Title: Error: DIV with ID "mybgcarousel" not found on page.

    2) Script URL (on DD): http://www.newyorkbannerstands.com/

    3) Describe problem:

    Hello,

    I am an SEO guy and am working on my clients site. I don't know exactly what happened because I did not mess with his code, but his slider disappeared from his home page and then I started seeing this error pop up. I have fixed the slider on the home page, but any other page for example http://www.newyorkbannerstands.com/window-cling/ produces the missing DIV error.


    I have no idea what is causing this or how to fix it. My client is a web designer and says he doesn't know either, so I guess I'm stuck, and I am 99% sure I didn't even cause this error. So as I understand it from reading around a bit, the error is caused because the <DIV> to call the slider is missing, but it should be missing...since he doesn't want it on any pages other than the home page.


    Can anyone help me sort this out please? I have no idea how to fix this, and I really need to get it remedied as quickly as I can.


    Thanks a lot,

    W
    Last edited by Beverleyh; 09-30-2013 at 05:03 AM. Reason: Formatting

  2. #2
    Join Date
    Sep 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I believe I found the same exact scenario here ---> http://www.dynamicdrive.com/forums/s...d-on-page-quot


    I will look at this and if anyone has any additional information for fixing this error on a WordPress site, please don't hesitate to post it.

    Thanks,

    w
    Last edited by Beverleyh; 09-30-2013 at 05:05 AM. Reason: Quote of 1st post removed

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well this idea (where presumably the fadeslideshow.js script in the other child themes' /js folders or wherever this points to when the child theme with the script is not being used - like if it defaults to the main js folder if there's no child theme - is just a blank file):

    Quote Originally Posted by azoomer View Post
    The way I use it in wordpress is in connection with a child theme and the javescript for the slideshow is only inserted on the particular page where it is needed with a conditional statement like this in the functions.php
    Code:
    function js_in_head(){
    if(is_front_page()){?>
    
    <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/fadeslideshow.js"></script>
    
    <?php }}
    add_action('wp_head', 'js_in_head');
    And I do the same for the other part of the slideshow script ( the part with the dynamic drive credit)
    If that will work or not on your wp installation is depending on your configuration, file structure and the way you edit your template. So more info on that will probably be needed to get this working on your site.
    or any other scheme whereby the script doesn't get put on the pages that aren't using it, is best.

    But, using a text only editor like NotePad, the script can be edited not to give that alert, here (a little more than halfway down in the bgcarousel.js file, add red comment slashes 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.$imageslid . . .
    Save and use that version. Since the script is already cached, it won't waste much bandwidth or loading time on the pages where it's not being used.

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

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

  4. #4
    Join Date
    Sep 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much! I will try this out and hopefully it's the fix I need.


    Thanks again,

    W

  5. #5
    Join Date
    Sep 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    THANK YOU!!

    I just applied this fix and it worked perfectly. You saved me from a ton of headache, and I am grateful!

    Thanks,

    Wally

Similar Threads

  1. Ultimate Fade-in ERROR: DIV with ID "fadeshow1" not found on page."
    By familyfanclub in forum Dynamic Drive scripts help
    Replies: 9
    Last Post: 09-16-2010, 11:20 AM
  2. "No content exists at page 1! Loading 1st page instead." ERROR
    By harshalizee in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 01-08-2010, 09:23 AM
  3. Resolved <a href "#"> is linking to an error page.
    By maximumovertime in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-13-2009, 07:00 PM
  4. login script "user data not found"
    By jimo in forum PHP
    Replies: 10
    Last Post: 01-13-2007, 07:10 PM

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
  •