jsroessler
12-23-2009, 02:08 PM
1) Script Title: All Levels Navigational Menu
2) Script URL (on DD):http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/
3) Describe problem:
I am getting the following error messages and have no Idea how to fix it.
IE 7/8 error code 0 Webpage error details
Message: Invalid argument.
Line: 347
Char: 4
Code: 0
URI: http://www.worldsbestsynthetics.com/worldsbestsynthetics/SSI/ddlevelsmenu.js
Firefox error console:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: line 347" data: no]
CODE IS Here (line 347 in red)
init:function(mainmenuid, dir){
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
this.topitemsindex=-1
this.ulindex=-1
this.topmenuids.push(mainmenuid)
this.topitems[mainmenuid]=[] //declare array on object
this.subuls[mainmenuid]=[] //declare array on object
this.hidetimers[mainmenuid]=[] //declare hide entire menu timer
if (this.enableshim && !this.shimadded){
this.shimmy={}
this.shimmy.topshim=this.addshimmy(document.body) //create top iframe shim obj
this.shimmy.bottomshim=this.addshimmy(document.body) //create bottom iframe shim obj
this.shimadded=true
}
var menubar=document.getElementById(mainmenuid)
var alllinks=menubar.getElementsByTagName("a")
this.getwindowsize()
for (var i=0; i<alllinks.length; i++){
if (alllinks[i].getAttribute('rel')){
this.topitemsindex++
this.ulindex++
var menuitem=alllinks[i]
this.topitems[mainmenuid][this.topitemsindex]=menuitem //store ref to main menu links
var dropul=document.getElementById(menuitem.getAttribute('rel')) document.body.appendChild(dropul) //move main ULs to end of document
dropul.style.zIndex=2000 //give drop down menus a high z-index
dropul._master=mainmenuid //Indicate which main menu this main UL is associated with
dropul._pos=this.topitemsindex //Indicate which main menu item this main UL is associated with
this.addEvent(dropul, function(){ddlevelsmenu.hidemenu(this)}, "click")
var arrowclass=(dir=="sidebar")? "rightarrowpointer" : "downarrowpointer"
var arrowpointer=(dir=="sidebar")? this.arrowpointers.rightarrow : this.arrowpointers.downarrow
if (this.arrowpointers.showarrow.toplevel)
this.addpointer(menuitem, arrowclass, arrowpointer, (dir=="sidebar")? "before" : "after")
this.buildmenu(mainmenuid, menuitem, dropul, this.ulindex, true, dir) //build top level menu
dropul.onmouseover=function(){
clearTimeout(ddlevelsmenu.hidetimers[this._master][this._pos])
}
this.addEvent(dropul, function(e){ //hide menu if mouse moves out of main UL element into open space
if (!ddlevelsmenu.isContained(this, e) && !ddlevelsmenu.isContained(ddlevelsmenu.topitems[this._master][parseInt(this._pos)], e)){
var dropul=this
if (ddlevelsmenu.enableshim)
ddlevelsmenu.hideshim()
ddlevelsmenu.hidetimers[this._master][this._pos]=setTimeout(function(){
ddlevelsmenu.hidemenu(dropul)
}, ddlevelsmenu.hideinterval)
}
}, "mouseout")
var subuls=dropul.getElementsByTagName("ul")
for (var c=0; c<subuls.length; c++){
this.ulindex++
var parentli=subuls[c].parentNode
if (this.arrowpointers.showarrow.sublevel)
this.addpointer(parentli.getElementsByTagName("a")[0], "rightarrowpointer", this.arrowpointers.rightarrow, "before")
this.buildmenu(mainmenuid, parentli, subuls[c], this.ulindex, false, dir) //build sub level menus
}
}
} //end for loop
this.addEvent(window, function(){ddlevelsmenu.getwindowsize(); ddlevelsmenu.gettopitemsdimensions()}, "resize")
},
setup:function(mainmenuid, dir){
this.domready(function(){ddlevelsmenu.init(mainmenuid, dir)})
}
}
2) Script URL (on DD):http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/
3) Describe problem:
I am getting the following error messages and have no Idea how to fix it.
IE 7/8 error code 0 Webpage error details
Message: Invalid argument.
Line: 347
Char: 4
Code: 0
URI: http://www.worldsbestsynthetics.com/worldsbestsynthetics/SSI/ddlevelsmenu.js
Firefox error console:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: line 347" data: no]
CODE IS Here (line 347 in red)
init:function(mainmenuid, dir){
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
this.topitemsindex=-1
this.ulindex=-1
this.topmenuids.push(mainmenuid)
this.topitems[mainmenuid]=[] //declare array on object
this.subuls[mainmenuid]=[] //declare array on object
this.hidetimers[mainmenuid]=[] //declare hide entire menu timer
if (this.enableshim && !this.shimadded){
this.shimmy={}
this.shimmy.topshim=this.addshimmy(document.body) //create top iframe shim obj
this.shimmy.bottomshim=this.addshimmy(document.body) //create bottom iframe shim obj
this.shimadded=true
}
var menubar=document.getElementById(mainmenuid)
var alllinks=menubar.getElementsByTagName("a")
this.getwindowsize()
for (var i=0; i<alllinks.length; i++){
if (alllinks[i].getAttribute('rel')){
this.topitemsindex++
this.ulindex++
var menuitem=alllinks[i]
this.topitems[mainmenuid][this.topitemsindex]=menuitem //store ref to main menu links
var dropul=document.getElementById(menuitem.getAttribute('rel')) document.body.appendChild(dropul) //move main ULs to end of document
dropul.style.zIndex=2000 //give drop down menus a high z-index
dropul._master=mainmenuid //Indicate which main menu this main UL is associated with
dropul._pos=this.topitemsindex //Indicate which main menu item this main UL is associated with
this.addEvent(dropul, function(){ddlevelsmenu.hidemenu(this)}, "click")
var arrowclass=(dir=="sidebar")? "rightarrowpointer" : "downarrowpointer"
var arrowpointer=(dir=="sidebar")? this.arrowpointers.rightarrow : this.arrowpointers.downarrow
if (this.arrowpointers.showarrow.toplevel)
this.addpointer(menuitem, arrowclass, arrowpointer, (dir=="sidebar")? "before" : "after")
this.buildmenu(mainmenuid, menuitem, dropul, this.ulindex, true, dir) //build top level menu
dropul.onmouseover=function(){
clearTimeout(ddlevelsmenu.hidetimers[this._master][this._pos])
}
this.addEvent(dropul, function(e){ //hide menu if mouse moves out of main UL element into open space
if (!ddlevelsmenu.isContained(this, e) && !ddlevelsmenu.isContained(ddlevelsmenu.topitems[this._master][parseInt(this._pos)], e)){
var dropul=this
if (ddlevelsmenu.enableshim)
ddlevelsmenu.hideshim()
ddlevelsmenu.hidetimers[this._master][this._pos]=setTimeout(function(){
ddlevelsmenu.hidemenu(dropul)
}, ddlevelsmenu.hideinterval)
}
}, "mouseout")
var subuls=dropul.getElementsByTagName("ul")
for (var c=0; c<subuls.length; c++){
this.ulindex++
var parentli=subuls[c].parentNode
if (this.arrowpointers.showarrow.sublevel)
this.addpointer(parentli.getElementsByTagName("a")[0], "rightarrowpointer", this.arrowpointers.rightarrow, "before")
this.buildmenu(mainmenuid, parentli, subuls[c], this.ulindex, false, dir) //build sub level menus
}
}
} //end for loop
this.addEvent(window, function(){ddlevelsmenu.getwindowsize(); ddlevelsmenu.gettopitemsdimensions()}, "resize")
},
setup:function(mainmenuid, dir){
this.domready(function(){ddlevelsmenu.init(mainmenuid, dir)})
}
}