View Full Version : Menu problem
igloo01
March 22nd, 2006, 11:57 AM
I have put a new menu on my site http://www.the-london-eye.com but it only seems to work in Internet Explorer. When using firefox the links don't seem to open.
I changed the curser properties, but that didn't seem to help.
Can anyone give me advice as to how I can get the menu to work cross browser? I would prefer to improve it rather than start again, since it took me ages to get all the images created for it!
Thanks
degsy
March 22nd, 2006, 05:22 PM
Your menu is not compatible with Mozilla
http://www.quirksmode.org/js/events_properties.html
http://www.reloco.com.ar/mozilla/compat.html
Specifically
srcElement = window.event.srcElement;
A simple show hide layer script would do for what you want.
igloo01
March 22nd, 2006, 07:02 PM
OK - thank you.
What's the show hide script you mentioned? Or is it on the webpages you gave me?
Thanks
degsy
March 22nd, 2006, 08:11 PM
Try this
<SCRIPT language=JavaScript>
function clickHandler(e) {
var targetId, srcElement, targetElement;
if (!e) var e = window.event
if (e.target) targ = e.target
else if (e.srcElement) targ = e.srcElement
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode
srcElement = targ;
if (srcElement.className == "Outline") {
targetId = srcElement.id + "d";
targetElement = document.all(targetId);
if (targetElement.style.display == "none") {
targetElement.style.display = "";
} else {
targetElement.style.display = "none";
}
}
}
document.onclick = clickHandler;
</SCRIPT>
igloo01
March 23rd, 2006, 07:31 PM
it's working now - thanks very much!
(I've given you a little mention on the script to say thanks!)
igloo :D
degsy
March 23rd, 2006, 07:40 PM
No probs :)
igloo01
March 23rd, 2006, 07:44 PM
Looking around my site a bit more, I have noticed an error on the guestbook page - again, this is only in firefox.
Here's the address (http://guest.the-london-eye.com) to it. I've put a verification code on, and tried to edit a bit to fit my site, but can someone have a look, see what's wrong.
Thanks!