Problem with JavaScript in XSL
Hi,need some help here... :|
i am working with XML and XSL with little JavaScript inside.In XSL i put some of the XML nodes in <div> tags. There is a simple function as well:
<script language="JavaScript">
function showhide(divID, imgName) {
if (document.all(divID).style.display == "none") {
document.all(divID).style.display = "block";
document.all(imgName).src = "minus.gif";
} else {
document.all(divID).style.display = "none";
document.all(imgName).src = "plus.gif";
}
}
</script>
So, the problem is there: when i get to <subnode> an error occurs: 'document.all(...).style.display' is null or not an object.
this is the XML:
<main>
<node>
<subnode>
</subnode>
</node>
</main>
All three are put in <div> so i can hide or show them and its ok with first and second level - <country> and <rule>.
any ideas???
thanks in advance :)
|