If there is nothing in suckerfish area, the assignment

var sfEls = document.getElementById("suckerfishmenu").getElementsByTagName("LI");

fails because getElementById() returns null. IE7 complaints for this but with no apparent consequences.

To solve this small issue simply insert this test before the declaration:

if (document.getElementById("suckerfishmenu") == null)
return;

Comments

dmsumon’s picture

Thank you very very very much for this beautiful n important solution. I love this theme a lot. it is more beautiful than any other premium Drupal themes, then why should we waste our money? Thank you

thollowood’s picture

Status: Active » Needs review

Yes, thank you. This was also the fix I needed. However, I am working with Drupal 6.x and using IE 8 - and this is a year after the last post noticed the issue.

I changed my suckerfish.js by inserting:

if (document.getElementById("suckerfishmenu") == null) return;

as show below:

sfHover = function()
{if (document.getElementById("suckerfishmenu") == null) return;
var sfEls = document.getElementById("suckerfishmenu").getElementsByTagName("LI");

Danny Englander’s picture

wow, this worked great for me, saved me hours of IE 7 "hair pulling".

One additional thing, in my case I had "Optimize JavaScript files" (under /admin/settings/performance) set to yes so I needed to clear my site cache to get the new updated script to render into the cached JS file. In my case I was using a custom theme but the code still worked.

Florian’s picture

Status: Needs review » Closed (fixed)

This is solved in salamanderskins 6.x-1.2