View Single Post
  #1  
Old 08-28-2006, 06:18 PM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default {literal} or no {literal} with Javascript code?

For the past three months, I've had a StatCounter code placed within my home.tpl, like this:
Code:
....home.tpl code...... { include file="modules/Interneka/menu_interneka.tpl" } {/if} <BR> { include file="poweredby.tpl" } <BR> <IMG src="{$ImagesDir}/spacer.gif" width="150" height="1" border="0"> </TD> <TD width="6">&nbsp;</TD> </TR> </TABLE> <br> <div align="center"> <!-- Start of StatCounter Code --> <script type="text/javascript" language="javascript"> ...and the rest of it....
The funny thing is, there have been no {literal}{/literal} tags placed around the javascript code and I've been getting statistics just the same. Every page visited by my customers has been recorded, with every detail.
How do you explain it, if every forum I go to, I read that in order for the javascript to work inside a .tpl file, you must surround it with {literal}{/literal} tags.

Tonight, I placed those tags around my javascript, and the stats I'm getting don't differ from the ones from yesterday, a week ago, and two months ago.
It seems to me those tags are optional, at least in my case...

I woul really like to have an explanation for this behaviour - or did I miss something?

Thanks,

Jack
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote