Re: [SMARTY] Using Smarty with JavaScript

From: Date: Mon, 11 Apr 2005 10:49:48 +0000
Subject: Re: [SMARTY] Using Smarty with JavaScript
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12450@lists.php.net to get a copy of this message
On Mon, Apr 11, 2005 at 08:21:59PM +1000, Robert Amos wrote: > On Apr 11, 2005 4:06 AM, Reynier Perez Mira <rperezm@estudiantes.uci.cu> wrote: > > Well I have to cases. The fisrt case is this: > > {literal} <script language="JavaScript" src="js/validator.js" > > type="text/javascript"></script>{/literal} > > You can't include a javascript file with {include} because smarty will > try to parse it. {fetch} will simply dump output. > > However what you originally had with: > <script language="JavaScript" src="js/validator.js" > type="text/javascript"></script> Passing my web pages through the the w3c validator (http://validator.w3.org/) it complains about the ''language="JavaScript"'' -- are there any browsers that need that tag or can we just drop it and be standards conformant ? > will always work fine, because its using a javascript include rather > than a smarty one. This means that its included on the client side and > goes no where near smarty. You don't need to put {literal} tags around > it though, you only use {literal} when there are {'s and }'s in your > code that you don't want smarty to parse. > > There's nothing wrong with the second case from a Smarty point of > view, so if there is something not displaying correctly you might need > to seek help from someone a little more adept with Javascript. > > -bok > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Alain Williams Parliament Hill Computers Ltd. Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 #include <std_disclaimer.h>

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