Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
dmsumon CreditAttribution: dmsumon commentedThank 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
Comment #2
thollowood CreditAttribution: thollowood commentedYes, 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");
Comment #3
Danny Englanderwow, 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.
Comment #4
Florian CreditAttribution: Florian commentedThis is solved in salamanderskins 6.x-1.2