[PHPTAL] JavaScript arrays using PHPTAL
Levi Stanley
levi at eneservices.com
Mon Jan 21 11:57:45 CET 2008
You can do something like this:
<script language="javascript" tal:content="structure
your-javascript-here-or-the-variable">
</script>
Best regards,
Levi
On Jan 21, 2008 5:43 AM, Anton Andrievskij <x.meglio at gmail.com> wrote:
> Hi.
>
> I have to fill JavaScript array using PHPTAL attributes.
>
> Whether I can use some <span ...tal-attributes here..></span> inside
> <script></script> construction?
>
> Example:
>
> <script language="JavaScript">
> items = array(
> <span ..PHPTAL loop here...>
> <span tal:replace ...writing item values to fill JavaScript
> array...></span>
> </span>
> )
> </script>
>
>
> If I can't do so, have you any idea about how to do it?
>
> Thanks,
> Anton
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20080121/14ca7952/attachment.htm
More information about the PHPTAL
mailing list