Re: Best way to include a .js file ?

From: Date: Thu, 31 Jan 2002 14:38:41 +0000
Subject: Re: Best way to include a .js file ?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2629@lists.php.net to get a copy of this message
In this example, the {literal} blocks are not needed since there are no curly braces in the javascript. Put your .js file under the web server document root, and give a path relative to document root, just like any .html file. Luc Saint-Elie wrote: > > Hello Julien > > {literal} > > <script type="text/javascript" > src="mywonderfulscriptthatkicksevryass.js"></script> > > {/literal} > > Luc > > At 11:01 31/01/02 +0100, you wrote: > >Hi, > >I am pretty new to templates systems in general and Smarty in particular. > >I have 2 questions you will certainly find of no particular interest : > >1) Do you know a good tutorial on Smarty ? > >2) I write in my .tpl file the following line > ><script type='text/javascript' src='file.js'></script> > >It does not work for me wherever I put the file.js > >Where must I put it ? Is there a better way to include css and javascript > >files ? > >--- > >You are currently subscribed to smarty as: luc@saint-elie.com > >To unsubscribe send a blank email to $subst('Email.Unsub') > >Visit Smarty's homepage at > >http://www.phpinsider.com/php/code/Smarty/ > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

« previous php.smarty.general (#2629) next »