Forums / General / ez publish script inside javascript

ez publish script inside javascript

Author Message

wendy br

Wednesday 12 November 2003 3:00:03 am

is it possible to put ez publish script inside javascript? and can someone tell me how to do that?

grtz ushi

Paul Forsyth

Wednesday 12 November 2003 3:10:08 am

Use lots of {literal} statements!

Remember to view the source to make sure the " and ' characters are set properly. Heres an example:

{literal}
<script language="JavaScript1.2" type="text/javascript">
<!--
var var1={/literal}"{$my_va1}"{literal};
var var2={/literal}"{$my_var2}"{literal};
var var3=new Array();
{/literal}{section name=MyArray loop=$my_array}{literal}
var3[{/literal}{$MyArray:index}{literal}]={/literal}"{$MyArray:item}"{literal};
{/literal}{/section}{literal}
//-->
</script>

paul