View Full Version : [resolved] JS hack for DDmenu, stops working in perl file

08-15-2005, 08:11 PM
Hello guys,

RESOLVED.. I had changed the div name in all places but the JS :o

I have spent all afternoon working on getting a suckerfish DD menu to work for my application. It does so both in IE and FF - until, that is, I put it into my perl file.

I have escaped the \\ in the JS (at sfhover\\b) but am at a loss for what else to try.

here's the JS

<script type="text/javascript"><!--//--><![CDATA[//><!--

sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\\\b"), "");
if (window.attachEvent) window.attachEvent("onload", sfHover);


Any tips appreciated