Ok, thank you very much, thats how i am gonna do it. I just didnt think about the fact that django is being done on the server side and the script on the client side.
Greetings Sven On Sun, Aug 9, 2009 at 8:20 PM, Daniel Roseman <dan...@roseman.org.uk>wrote: > > On Aug 9, 4:59 pm, Sven Richter <sver...@googlemail.com> wrote: > > 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 > > > > Rather than having a dynamic URL with parameters, you'll just have to > make the parameters part of the POST. So you can still use the url tag > at render time to output the URL, but instead of it being /entry/5/ > rate/positive/ it should just be eg /entry/rate/, and the values for > rate and pos_neg are keys in the POST. > -- > DR. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---