That's odd. Probably something that you did (perhaps in conjunction with a bug in the code) that makes more this.subcontentids than elements bearing those id designations. However, since the code appears to work even with the error, if you were to add error checking to this (as shown):
Code:
expandsubcontent:function(subcontentid){
for (var i=0; i<this.subcontentids.length; i++){
var subcontent=document.getElementById(this.subcontentids[i]) //cache current subcontent obj (in for loop)
if(subcontent)
subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none" //"show" or hide sub content based on matching id attr value
}
},
That might be all that's required to fix it up.
Bookmarks