I got a problem regarding how to assign a java script variable to a smarty variable. Here is the code snippet.
function getDateInfo(date, wantsClassName)
{
You can't assign a client-side value to a smarty variable, as smarty is a templating language that runs on the server. Smarty assignments can only be done on the server-side, that is to say, from PHP. E.g.:
$smarty->assign('timestamp',time());
So what you can do is something like:
$smarty->assign('timestamp',time()); //in your PHP script
//in your JS
var currentTS = {$timestamp};
See http://www.smarty.net/manual/en/api.assign.php