Advanced Search

Results 1 to 2 of 2

Thread: ddtabmenu problems

  1. #1
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ddtabmenu problems

    Hi everyone,

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

    http://www.dynamicdrive.com/dynamici...menu/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

  2. #2
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    (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.
    Code:
    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]
    		}
    	}
    }
    -- Chris
    informal JavaScript student of Douglas Crockford
    I like wikis - a lot.

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
  •