gecko
10-13-2002, 05:38 AM
I have this snipplet of code (the entire script is at http://www.jsmadeeasy.com/javascripts/IE5%20Scripts/outline/template.htm ) that works fine on IE5, but not on Mozilla:
<SCRIPT LANGUAGE="JavaScript">
function clickHandler() {
var targetId, srcElement, targetElement;
srcElement = window.event.srcElement;
if (srcElement.className == "Outline") {
targetId = srcElement.id + "d";
targetElement = document.all(targetId);
if (targetElement.style.display == "none") {
targetElement.style.display = "";
srcElement.src = "images/ofolder.gif";
} else {
targetElement.style.display = "none";
srcElement.src = "images/folder.gif";
}
}
}
document.onclick = clickHandler;
</SCRIPT>
Any suggestions for how to convert this for use with Mozilla? Thanks in advance.
<SCRIPT LANGUAGE="JavaScript">
function clickHandler() {
var targetId, srcElement, targetElement;
srcElement = window.event.srcElement;
if (srcElement.className == "Outline") {
targetId = srcElement.id + "d";
targetElement = document.all(targetId);
if (targetElement.style.display == "none") {
targetElement.style.display = "";
srcElement.src = "images/ofolder.gif";
} else {
targetElement.style.display = "none";
srcElement.src = "images/folder.gif";
}
}
}
document.onclick = clickHandler;
</SCRIPT>
Any suggestions for how to convert this for use with Mozilla? Thanks in advance.