On 11/25/2010 10:55 AM, Pidoux75 wrote:
Thanks a lot :)
In the same way, is there a means of get a javascript value and put in velocity value ?
like
<!--script type="text/javascript"//--> function changeList() {
choix = document.getElementById("zonesList").value; #set ($newname = newZone) $obj.set('intergeozone', choix); populateCountries(choix);
} </script>
Cause, if I write this, I got an error "Failed to execute macro: velocity".
Is there a way to do it or not?
Velocity is executed on the server, JavaScript is executed on the client. You can't use JS variables inside Velocity, only the other way around. To send JS variables to Velocity, you have to send a request to the server. Take a look at http://www.prototypejs.org/api/ajax/updater -- Sergiu Dumitriu http://purl.org/net/sergiu/