[PHPTAL] Fetch variable in javascript ?

KLEIN Stéphane stephane at is-webdesign.com
Thu Jun 22 09:43:20 CEST 2006


Hi,

I would like fetch one variable in javascript code like this standard 
php file :

<html>
<head>
....
<script>
<!--
function myJavascriptFunction() {
    foobar="<?php echo($foobar); ?>";
    alert(foobar);
}
-->
</script>
...
</head>
...
</html>

How can I do it in TAL template ?

Thanks for your help.
--Stéphane



More information about the PHPTAL mailing list