SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jul 2011
    0 Post(s)
    0 Thread(s)

    TypeError: Cannot read property 'style' of null

    i have a top navigation bar with a clickable down arrow. once clicked a drop-down will appear. there are about 5 to 6 click downs. the content in the click downs are store in an external html file and i use an iframe to display it. so if 1 arrow is clicked content will show and if another is clicked while the 1st stays open, it should replace the 1st one. <snip/>

    I am getting an error that says TypeError: Cannot read property 'style' of null. the code line it's referring to is the one below with the stars:

    Nav.prototype.closeAllSupernavLists = function(){
    for(var i=0; i<this.sections.length; i++){
    //*****the line below is causing the error. this.snavIframeDoc.getElementById(this.sections[i].snavListId).style.display = 'none';

    this.sections[i].snavTriggerRegion.className = this.sections[i].snavTriggerRegion.className.replace('active', '');

    I am so close to solving this, but my brain is fried.
    Last edited by Mittineague; Jul 21, 2011 at 21:37. Reason: removing unnecessary link

Tags for this Thread


Posting Permissions

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