On Thursday, April 14, 2011, Stéphane Klein <steph...@harobed.org> wrote:
> Hi,
>
> context : Pylons 1 and Routes
>
> some time, I need to construct some links like h.url("route_name", 
> param1="foobar") but in Javascript.
>
> I would like a url contructor 
> (http://routes.groovie.org/modules/util.html#routes.util.url_for) in 
> javascript. Does someone have already create this tools ?

Hi Stéphane

We use Mako templates for that here. Like:

<script>
var url = "${url(controller="foo", action="bar")}";
</script>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to