Note that you will have some troubles with bracket if you would like to customize your JavaScript function with eZ variables. I mean, that the code below will fall in error :
<script type="text/javascript">
<!--
function myFunction(var1, var 2)
{
alert({$mytext});
}
--!>
Prefer this :
{literal}
<script type="text/javascript">
<!--
function myFunction(var1, var 2)
{
{/literal}
alert({$mytext});
{literal}
}
--!>
{/literal}
Another way to add template data into javascript code is:
<script>
var javascript_variable={$template_variable};
{literal}
function javascript_function()
{
alert(javascript_variable);
}
{/literal}
</script>
I have been using dojo with Smarty (http://smarty.php.net) and it is excellent. Take advantage of the themes, because they are very nice. It might be good to create a datatype that can do regular expression validation with dojo, using the "ValidationTextBox".
Good luck.
You must be logged in to post messages in this topic!