Your best bet would be to achieve this using Ajax. Check out these basic tutorials:
http://www.b-list.org/weblog/2006/jul/31/django-tips-simple-ajax-example-part-1/ http://www.b-list.org/weblog/2006/aug/05/django-tips-simple-ajax-example-part-2/ Steve On Aug 31, 8:00 pm, Yury Lifshits <[EMAIL PROTECTED]> wrote: > Dear All, > > How can one implement a hit counter for external link in Django? > I am coding a directory of companies [ it's in > Russian,http://shopping2.ru/business > ]. > Every company profile has an external link to company's website. > I want to display a number of times this link was clicked. > > The link should be direct, not like /counter?serve=http:// > company.com > > Of course, I just add an integer field "clickcounter" in company > model. So the display part is easy. > The question is how to "catch" the click event. I know there is > "onclick" attribute and some javascript code can be called there. > > Are there few lines of javascript that will send an "update counter" > message to django, while user is walking to an external website? > > Thanks, > Yury. > > P.S. I've foundhttp://code.google.com/p/django-simplestats/but it is > a general statistics engine while I only need a thing described above. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---