PDA

View Full Version : ddtabmenu problems



Rasenheizung
06-21-2009, 01:26 PM
Hi everyone,

im a coding-rookie. So please help me out with some problems regarding a this dynamicdrive-script:

http://www.dynamicdrive.com/dynamicindex1/dbmenu/index.htm

Here is my testpage-try:

http://www.planet-outlook.de/indexoutlookneu.htm

Everything works fine, but i get this error only in IE 8. Firefox/Opera works.:

Details zum Fehler auf der Webseite

Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET CLR 1.1.4322)
Zeitstempel: Sun, 21 Jun 2009 13:24:23 UTC


Meldung: 'document.getElementById(...)' ist Null oder kein Objekt
Zeile: 68
Zeichen: 2
Code: 0
URI: http://www.planet-outlook.de/ddtabmenu.js


Meldung: 'null' ist Null oder kein Objekt
Zeile: 78
Zeichen: 5
Code: 0
URI: http://www.planet-outlook.de/ddtabmenu.js


Meldung: 'document.getElementById(...)' ist Null oder kein Objekt
Zeile: 68
Zeichen: 2
Code: 0
URI: http://www.planet-outlook.de/ddtabmenu.js


Meldung: 'document.getElementById(...)' ist Null oder kein Objekt
Zeile: 68
Zeichen: 2
Code: 0
URI: http://www.planet-outlook.de/ddtabmenu.js


Meldung: 'document.getElementById(...)' ist Null oder kein Objekt
Zeile: 68
Zeichen: 2
Code: 0
URI: http://www.planet-outlook.de/ddtabmenu.js

Jesdisciple
06-22-2009, 06:18 AM
(Google can clarify the error messages for those who don't know German: http://translate.google.com/translate_t.) Here's the problem function, with the problem lines (68 and 78) marked.

The issue is that no element has an ID attribute with a value of whatever tabid was passed to the function. We need to know the value of tabid for every error, and the HTML source. The easiest way to give these (and most anything else we could ask for) would be a live URL.
init:function(tabid, dselected){
68 var menuitems=document.getElementById(tabid).getElementsByTagName("a")
this[tabid+"-menuitems"]=menuitems
for (var x=0; x<menuitems.length; x++){
if (menuitems[x].getAttribute("rel")){
this[tabid+"-menuitems"][x].hasSubContent=true
if (ddtabmenu.disabletablinks)
menuitems[x].onclick=function(){return false}
if (ddtabmenu.snap2original[0]==true){
var submenu=document.getElementById(menuitems[x].getAttribute("rel"))
menuitems[x].onmouseout=function(e){ddtabmenu.revert2default(submenu, tabid, e)}
78 submenu.onmouseover=function(){ddtabmenu.clearrevert2default(tabid)}
submenu.onmouseout=function(e){ddtabmenu.revert2default(this, tabid, e)}
}
}
else //for items without a submenu, add onMouseout effect
menuitems[x].onmouseout=function(e){this.className=""; if (ddtabmenu.snap2original[0]==true) ddtabmenu.revert2default(this, tabid, e)}
menuitems[x].onmouseover=function(){ddtabmenu.showsubmenu(tabid, this)}
if (dselected=="auto" && typeof setalready=="undefined" && this.isSelected(menuitems[x].href)){
ddtabmenu.showsubmenu(tabid, menuitems[x])
this[tabid+"-dselected"]=menuitems[x]
var setalready=true
}
else if (parseInt(dselected)==x){
ddtabmenu.showsubmenu(tabid, menuitems[x])
this[tabid+"-dselected"]=menuitems[x]
}
}
}