Forums / General / JavaScript With Ezpublish ???
Amer Azzaz
Friday 20 January 2006 2:36:52 am
Hi to All If we want to write javaScript in file tpl we should put the javascript in tag {literal} {/literal}But in the function javascript I want to use the template Code.
{literal} <script language="javascript"> function function() { var country=xxx; if(country=={$UsaId}) { blbla blabla.... } } </script>{/literal}
Can I write this code, Plz If yes what is the syntaxe???Thank you for help
Paul Forsyth
Friday 20 January 2006 3:02:31 am
Just use literal again:
{literal} <script language="javascript"> function function() { var country=xxx; if(country=={/literal}{$UsaId}{literal}) { blbla blabla.... } } </script> {/literal}
Use an many times as you need to.
Paul
Friday 20 January 2006 3:30:33 am
Thank you Mr.Very Good, It's nice.