[TYPO3] template and Javascript problem

Cray Flatline cryangel at gmail.com
Sat Sep 1 21:45:01 CEST 2007



Tapio Markula wrote:

Can you give some direction, which way will be best to it? I'm still 
newbie to Typo3 (:

> Cray Flatline kirjoitti:
>>
>> I have some problem with javascript in tempate. I have such button 
>> code in my template:
>>
>> =========================
>> <!--LiveInternet counter--><script type="text/javascript"><!--
>> document.write("<a href='http://www.liveinternet.ru/click' "+
>> "target=_blank><img src='http://counter.yadro.ru/hit?t44.4;r"+
>> escape(document.referrer)+((typeof(screen)=="undefined")?"":
>> ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
>> screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
>> ";"+Math.random()+
>> "' alt='' title='LiveInternet' "+
>> "border=0 width=31 height=31><\/a>")//--></script><!--/LiveInternet-->
>> =========================
>>
>>
>> But when I look in the browser's "View source code..." I see really 
>> strange thing:
>>
>> =========================
>> <!--LiveInternet counter--><script type="text/javascript"><!--
>> document.write("<a href="http://www.liveinternet.ru/click" 
>> target="_blank"><img src="http://counter.yadro.ru/hit?t44.4;r&quot;+
>> escape(document.referrer)+((typeof(screen)==&quot;undefined&quot;)?&quot;&quot;: 
>>
>> &quot;;s&quot;+screen.width+&quot;*&quot;+screen.height+&quot;*&quot;+(screen.colorDepth? 
>>
>> screen.colorDepth:screen.pixelDepth))+&quot;;u&quot;+escape(document.URL)+ 
>>
>> &quot;;&quot;+Math.random()+
>> &quot;" alt="" title="LiveInternet" border="0" width="31" height="31" 
>> /><\/a>")//--></script><!--/LiveInternet-->
>>
>> </a>
>> =========================
>>
>> So it changes " to &quot and writes </a> in the end. I can't 
>> understand what I have to do. Can anybody help me with it? Any 
>> suggestions? Or I need to forget about it and insert it with TS?
>>
>> P.s.: I'm using Templavoila.
>>
>>
> set that using some TS Template object - and take that off from from the 
> actual HTML-template

-- 
W BR, Cray Flatline


More information about the TYPO3-english mailing list