[TYPO3] Troubles getting Javascript validated between <head> tags
Kimmo Helle
kimmo.helle at paitsio.com
Fri Feb 2 23:01:58 CET 2007
Hi all,
I have a piece of JavaScript that keeps changing in the output code if I try
to get it validated. I have some code and I've tried tp put <-- with //-->
and/ or /*<![CDATA[*/ with /*]]>*/. If I don't put these parts in, the code
won't validate. If I put them, it changes the code into a mess at the end
like this:
<script type="text/javascript">
<!--
function init() {
activateMenu('nav3');
activateMenu('nav');
}
window.onload=init;
activateMenu = function(nav3) {
/* currentStyle restricts the Javascript to IE only */
if (document.getElementById(nav3) != null) {
if (document.all && document.getElementById(nav3).currentStyle) {
var navroot = document.getElementById(nav3);
/* Get all the list items within the menu */
var lis=navroot.getElementsByTagName("LI");
for (i=0; i<lis.length; i="" if="" the="" li="" has=""
another="" menu="" level="" iflisilastchildtagname="UL" assign=""
function="" to="" lisionmouseover="function()" display="" inner=""
thislastchildstyledisplay="none" lisionmouseout="function()" --="">
</script>
Any ideas?
Cheers,
Kimmo Helle
More information about the TYPO3-english
mailing list