View Full Version : IE7/8 Errors with DD Tab Menu

05-13-2009, 08:32 PM
Script: DD Tab Menu


Hi, when using both IE7 & IE8 I am getting the following error;

Line: 68
Error: 'document.getElementById(...)' is null or not an object

In normal browser mode, it shows the exclamation mark but in debug it throws up same error a number of times relating to this line in the javascript file;

var menuitems=document.getElementById(tabid).getElementsByTagName("a")

My example can be seen here; http://dev.orinovo.net/ddtabs.asp

Up to now I have had success finding most solutions for small issues with some other scripts by reading other posts and thanks for such a great and valuable resource but I have run into a dead end on this one and would appreciate any help.

05-14-2009, 12:01 AM
The errors are to be expected, since there's only one menu on your page (ddtabs3), yet you have 5 initialization calls:

<script type="text/javascript">
//SYNTAX: ddtabmenu.definemenu("tab_menu_id", integer OR "auto")
ddtabmenu.definemenu("ddtabs1", 0) //initialize Tab Menu #1 with 1st tab selected
ddtabmenu.definemenu("ddtabs2", 1) //initialize Tab Menu #2 with 2nd tab selected
ddtabmenu.definemenu("ddtabs3", 1) //initialize Tab Menu #3 with 2nd tab selected
ddtabmenu.definemenu("ddtabs4", 2) //initialize Tab Menu #4 with 3rd tab selected
ddtabmenu.definemenu("ddtabs5", -1) //initialize Tab Menu #5 with NO tabs selected (-1)


Remove the 4 ones that are not ddtabs3.

05-14-2009, 04:51 PM
Thanks, that worked great. I have another issue now though, with my link above in IE8 the menu systems renders perfect, but in IE7 (IE7 actual browser & IE8 debug tools in IE7 mode) the bottom tabcontainer has moved up and mostly overlays the top block menu.
On the homepage in my local install this bottom container has a background image so it ends up mostly blocking out the top menu. Other non-IE browsers are fine, it was ok until I removed the <h2>3) Example 3</h2> reference from original sample file.

05-15-2009, 04:29 PM
Okay, I put some header text back and it works fine, why is this so? see example;


But I do not want header text, so I gave a hack a go to fix it;


but still no luck...anyone help please.