Closed (fixed)
Project:
Salamander Skins
Version:
6.x-1.1
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2009 at 21:24 UTC
Updated:
26 Feb 2013 at 01:52 UTC
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 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 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 commentedThis is solved in salamanderskins 6.x-1.2