[TYPO3] Troubles getting Javascript validated between <head> tags
Kimmo Helle
kimmo.helle at paitsio.com
Sat Feb 3 08:54:21 CET 2007
Hi Ries,
I added it to the html template and mapped it with templavoila. It shows
still ok in templavoila when I select headers.
Kimmo
On 3.2.2007 00:35, in article
mailman.120226.1170455750.21325.typo3-english at lists.netfielders.de, "R. van
Twisk" <typo3 at rvt.dds.nl> wrote:
> hey Kimmo,
>
> how did you add the javascript?
>
> Ries
>> 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