On Sun, Aug 9, 2009 at 5:43 PM, Sven Richter<sver...@googlemail.com> wrote:
> Hi all,
>
> i wanted to know if it is possible to pass a Javascript variable to
> the url template tag?
>
> Like:
> <html>
> ...
> <script language="javascript">
> var param = 12;
> var url = {% url url_name param %}
> ...
>
> I've done a lot af googling but havent found anything.
>

It's not possible like this, of course. The template tags are
processed at the server, the javascript later at the client. What is
it you'd like to do? It's hard to help out if you don't tell us what
you're trying to achieve.


Matthias

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

Reply via email to