SV: [SMARTY] java script

From: Date: Fri, 03 Jan 2003 11:17:35 +0000
Subject: SV: [SMARTY] java script
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6999@lists.php.net to get a copy of this message
Hello Simon, Enclose the Javascript lines with {literal} ... javascript code .... {/literal} Kindest regards, Jan -----Oprindelig meddelelse----- Fra: Simon [mailto:velikanka@hotmail.com] Sendt: 3. januar 2003 12:14 Til: smarty-general@lists.php.net Emne: [SMARTY] java script Hi, I'm trying to put this java into template <script language="JavaScript1.2"> opera=navigator.userAgent.indexOf("Opera")!=-1?1:0; if (opera) { document.write('<link href="html/css/indexOpera.css" rel="stylesheet" type="text/css">'); } else { document.write('<link href="html/css/index.css" rel="stylesheet" type="text/css">'); } </script> but i receive this error: Parse error: parse error, expecting `')'' in d:\share\webdesign\avdija\web\bihnet1\smarty\templates_c\%%117\%%1172603085\ index.tpl.php on line 4 How do I use java script with smarty Tnx -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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