Have you tried something like:

$(function(){
       $("a").click(function(){
              $.get("trackingURL");
              return true;
       });
});

I haven't tried modifying onClick, etc, I normally just put all the
directives in a script block.

- jake

On 3/6/07, Yoav Shapira <[EMAIL PROTECTED]> wrote:

Hi,
I have a simple link in my HTML page that I want to track when users
click on.  I thought this would be pretty simple, like so:

<a href="destinationUrl" onClick="$.get('trackingUrl'); return
true;">Destination</a>

When I run the above code, I get no errors, but trackingUrl doesn't
get hit.  There's no record of a request to trackingUrl in my web
server access log.  How come?

The URL I'm using for trackingUrl is of the form
/foo/bar.png?name=value -- is that a problem?  Must the URL be
absolute, including the http:// and host name?

Thank you,
Yoav

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to