Problem with JavaScript in templates

From: Date: Thu, 31 Oct 2002 10:53:47 +0000
Subject: Problem with JavaScript in templates
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6283@lists.php.net to get a copy of this message
I have some Javascript in my template like this: <script language=\"javaScript\"> <!-- function closeWin() { var closeWin=window.self.close(); } // --> </script> When parsing the template that contains this, Smarty dies with a fatal error: Fatal error: Smarty plugin error: [in string template line 7]: unknown tag - 'var' in /var/www/php/includes/Smarty.class.php on line 1980 It looks like the curly brackets used by JavaScript are confusing Smarty into interpreting JavaScript as Smarty tags. How can I prevent this?

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