Yup, like this:

<a href="moo.htm" onclick="writeLog('moo');return false">

...where writelog() is a function that does your Ajax call.

Alternately, you can just get Google Analytics to log it:

http://www.google.com/support/analytics/bin/answer.py?hl=en-ch&answer=55519



On Jul 4, 9:32 am, Fonziguy <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to track outgoing links on my site. When the user clicks on
> a link, I want them to be taken to the site (href) and I also want a
> background script call that records the link (via Ajax).
>
> The script I have worked in development mode but only works
> occasionally in production mode.
>
> Is it possible to link to a new site and call an ajax request at the
> same time?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to