Re: [SMARTY] Smarty an JavaScript File
| From: | Andre Gemünd | Date: | Mon, 14 Mar 2005 07:44:08 +0000 |
| Subject: | Re: [SMARTY] Smarty an JavaScript File | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12327@lists.php.net to get a copy of this message | ||
Reynier Pérez Mira wrote:
Hola Reynier
The error return me is that the function emailCheck is not defined. It's ocurred when I call the users.php?mod=register page. I don't see the inclusion like <script src="..."> in the above snippet, but i guess you've just mistyped the path. Although your .js resists in your templates directory, you have to access it with the name of the directory, because the working directory is the path to the php-file.
The other questions is can I assign more var than one in just one call to $jc_tpl->assign function or exists another allow me this? You can assign an associative array to a template variable, which you can access with the dot operator:$smarty->assign('foo', array('foo' => 'bar')); --- {$foo.foo} hth Andre