I am looking for a rating function AJAX style. So what i am trying to do is the following:
Click on a link <a id="vote_up"... register a Jquery function to call on that click with: $('a#vote_pos').click(rate_it); and then in rate_it call the url rate with two paramaters int entry and string pos_neg like $.ajax( {type:"POST", url:/entry/rate/pos_neg, ... and i wanted to build the url with the url tag like: url:{% url rate entry pos_neg %} Sven On Sun, Aug 9, 2009 at 5:52 PM, Matthias Kestenholz < matthias.kestenh...@gmail.com> wrote: > > 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 -~----------~----~----~----~------~----~------~--~---