Forums / General / JavaScript With Exponential ???

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

JavaScript With Exponential ???

Author Message

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

Amer Azzaz

Friday 20 January 2006 3:30:33 am

Thank you Mr.
Very Good, It's nice.