The main menu tabs on this website don't show up in IE7. Can someone help me find a hack for this?
http://www.heritagechurch.us/Sandbox
Thanks,
dbc
The main menu tabs on this website don't show up in IE7. Can someone help me find a hack for this?
http://www.heritagechurch.us/Sandbox
Thanks,
dbc
Only for future reference:
Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:
Warning: Please include a link to the DD script(s) in question in your post. See this post for more information.
For current reference:
Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.
That all said, works fine on the demo page:
http://www.dynamicdrive.com/dynamicindex1/tabmenu.htm
On the page you linked to it's something about the markup (possibly menu header tabs without subItem content) and IE 7 that has IE 7 at times calculating a negative value forleftPoshere:
such that when you get to the highlighted line, IE 7 throws an error. Replace that line with:Code:var leftPos = mainMenuLinks[subCounter-1].offsetLeft; document.getElementById('submenu_'+subCounter).style.paddingLeft = leftPos + 'px'; subItem.style.position ='absolute'; if(subItem.offsetWidth > parentWidth){ leftPos = leftPos - Math.max(0,subItem.offsetWidth-parentWidth); }subItem.style.paddingLeft = leftPos + 'px';subItem.style.position ='static';
And it will be fine.Code:subItem.style.paddingLeft = Math.max(0, leftPos) + 'px';
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
deathbycheese (04-27-2012)
Thanks John, for pointing out the missing DD reference. I know it was on there in my earlier versions, but am not surprised it fell off sometime during the mad melee that has been this project.I will be sure to always double-check from now on.
Also, I will try your suggestions and let you know if this resolves the issue.
Thanks again,
dbc
edit:
Wait, it DOES have the DD reference. You're probably looking at the includes only and not the actual .js file. If you know a way for the reference to be 'included' when using PHP includes, I'd be happy to adjust it accordingly.
I knew I was a loyal DD supporter.![]()
Last edited by deathbycheese; 04-27-2012 at 04:50 PM. Reason: I looked at the file and...
John, you're a god.
dbc
Um, the credit is supposed to be in the page's source code, not in the javascript file (though it can be there too). You took an on page script and made it external with this in the page's source code:
According to the rules, that should be:HTML Code:<script type="text/javascript" src="./script/mainNavScript.js"></script>
Thanks, and you're welcome.HTML Code:<script type="text/javascript" src="./script/mainNavScript.js"> /*********************************************** * Tab Menu- By Alf Magne Kalleland www.dhtmlgoodies.com * Script featured and available at Dynamic Drive: http://www.dynamicdrive.com/ * This notice must stay intact for use ***********************************************/ </script>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Thanks. I will fix it today.
One more issue:
I can't get the submenu to stay visible while on a corresponding page. It times out and disappears. Do you know how to fix that? My beta testers keep complaining about it.
Here's the link again for easy reference:
http://www.heritagechurch.us/Sandbox
Thanks again in advance!
dbc
Bookmarks