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

Thread: 'contentdivs[...].style' is null or not an object

  1. #1
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Question 'contentdivs[...].style' is null or not an object

    Featured Content Slider v2.4 and RSS Display Box (on the same page)
    http://www.dynamicdrive.com/dynamici...tentslider.htm
    http://www.dynamicdrive.com/dynamici...ybox/index.htm

    Tested on IE7, Firefox and IE8 for some odd reason I get this error on one page, the others work fine.
    'contentdivs[...].style' is null or not an object

    I don't have this online.
    Any ideas?

    Featuredcontentslider version is attached.

    Edit: I think I may have solved this one... Not sure?
    rssdisplaybox.js line 25 -> Red needed to be removed as the image was already in the rssbox folder.
    Code:
    this.loadingHTML='<img src="'+rssoutputscript.replace('main.php', '')+'/loading.gif" /> Initializing RSS Display Box...' 
    //Specify HTTML to show while feed is being fetched
    Last edited by student101; 11-02-2009 at 06:54 PM. Reason: No support yet!
    ASCII stupid question, get a stupid ANSI!
    Beta is Latin for still doesn’t work.
    Mac users swear by their Mac, PC users swear at their PC.
    Keyboard not found...Press any key to continue.

  2. #2
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Question

    Tested in Google Chrome and the Featured Content Slider stopped working again.
    This is amazing code but what happens if the code breaks like this?
    I surely can't be the only one who has had this issue.

    Edit: Looks like visibility:hidden; is a problem.

    Tested script with AHAH after doing this /*visibility:hidden;*/ it all worked, this is still unconfirmed as nobody with javascript knowledge has bothered to answer my first post

    It can't be this simple, there must be something else that caused the first error, then all of a sudden disappeared.

    Odd
    ASCII stupid question, get a stupid ANSI!
    Beta is Latin for still doesn’t work.
    Mac users swear by their Mac, PC users swear at their PC.
    Keyboard not found...Press any key to continue.

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Are there any other scripts besides these two scripts on the same page? As far as O cam see both of the possible issues you cited above shouldn't be an issue. A link to the actual page would make it a lot easier to debug btw.
    DD Admin

  4. #4
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Default

    Just sent a PM
    Edit: I have Firebug for Firefox.
    Debug bar and IE developer toolbar for IE8, tried to debug but maybe my methods / knowledge is limited.
    Last edited by student101; 11-04-2009 at 09:39 PM.
    ASCII stupid question, get a stupid ANSI!
    Beta is Latin for still doesn’t work.
    Mac users swear by their Mac, PC users swear at their PC.
    Keyboard not found...Press any key to continue.

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I've read your PM. Looking at the associates.php URL you sent me, I don't get any JavaScript errors in FF 3.x nor IE8 when clicking around. Is there something specific I need to do to generate the error?
    DD Admin

  6. #6
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    I've read your PM. Looking at the associates.php URL you sent me, I don't get any JavaScript errors in FF 3.x nor IE8 when clicking around. Is there something specific I need to do to generate the error?
    Yes, that's just it!
    When you load it the first time it works,
    if you stick around and click other pages, its almost as if the associates javascript forgets to load after opening it again?

    Edit: You may need to open this two or three times in different browser sessions at the same time, but start at the index.php page


    That is why I say odd, very odd?

    If there was a method to load the javascript and check that it's loaded, then maybe that would be an answer.

    Edit: Message: 'contentdivs[...].style' is null or not an object Line: 153
    Char: 3
    Code: 0
    URI: contentslider_pause.js
    Last edited by student101; 11-05-2009 at 06:26 AM.
    ASCII stupid question, get a stupid ANSI!
    Beta is Latin for still doesn’t work.
    Mac users swear by their Mac, PC users swear at their PC.
    Keyboard not found...Press any key to continue.

  7. #7
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Default

    ddadmin, thanks for respodnding,
    I guess I can't use the Featured Content Slider.

    Regards.

    Edit: Is there a method or a way for me to stress test this?
    Last edited by student101; 11-06-2009 at 06:25 AM. Reason: method or a way for me to stress test
    ASCII stupid question, get a stupid ANSI!
    Beta is Latin for still doesn’t work.
    Mac users swear by their Mac, PC users swear at their PC.
    Keyboard not found...Press any key to continue.

  8. #8
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ah ok after quite some time going from page to page and clicking various things at random, I was able to duplicate the problem. I believe I know what's going on now, which has nothing to do with RSS Scroller, but simply FCS. The problem occurs since on the "divisions" page, your FCS contains 8 toggler links (ie: Feature 1, Feature 2 etc), while on the other pages, it only contains 6. If you click on "Feature 8" on "divisions" for example, then go to the "associates" page, the error occurs, as the script tries to "persist" the 9th toggler link on the later page, which doesn't exist. In other words, this is a bug that can be duplicated consistently.

    To fix this issue, inside contentslider.js, try finding the line below, and add to it above it the two lines in red:

    Code:
    	setting.currentpage=Math.min(setting.contentdivs.length-1, setting.currentpage)
    	setting.prevpage=setting.currentpage
    	this.turnpage(setting, setting.currentpage, true)
    Not fully tested yet, but should work.
    DD Admin

  9. The Following User Says Thank You to ddadmin For This Useful Post:

    student101 (11-07-2009)

  10. #9
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Default

    Ah, I see!
    I always wondered why when I clicked Feature one on Associates, then opened Divisions, Feature one would also be selected, the clue was in my face all along!

    I'm using the paused content slider, attached.
    Edit: Still the same after clearing the cache and attempting the fix.


    Edit: So the question; how to remove the persistance of the javascript?
    Last edited by student101; 11-06-2009 at 06:08 PM.
    ASCII stupid question, get a stupid ANSI!
    Beta is Latin for still doesn’t work.
    Mac users swear by their Mac, PC users swear at their PC.
    Keyboard not found...Press any key to continue.

  11. #10
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ok, lets see if disabling persistence fixes the issue for you then. Using the original contentslider.js file, try setting the following line to false:

    Code:
    var featuredcontentslider={
    
    //3 variables below you can customize if desired:
    ajaxloadingmsg: '<div style="margin: 20px 0 0 20px"><img src="loading.gif" /> Fetching slider Contents. Please wait...</div>',
    bustajaxcache: true, //bust caching of external ajax page after 1st request?
    enablepersist: false, //persist to last content viewed when returning to page?
    DD Admin

  12. The Following User Says Thank You to ddadmin For This Useful Post:

    student101 (11-07-2009)

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
  •