[jQuery] Re: Using jQuery to track advert clicks

2007-12-11 Thread Chris Hardy
I'm not an expert with jQuery, but I think something like this might do the trick.. $("a.adtrack").click(function(){ // Get url of advert var adURL = $(this).attr("href"); // Log click to database $.ajax({ type: "GET", url: "/path/to/tracking/script.asp", data

[jQuery] Re: AJAX Security

2007-11-20 Thread Chris Hardy
I'm about to add this functionality to my user registration page, so I'm wondering the same. The protection I have at the moment is pretty basic I check the HTTP referrer to make sure the AJAX call is coming from my registration page. With a blank or mismatched referrer, the script will

[jQuery] Re: .load appending content in IE7 only

2007-11-14 Thread Chris Hardy
After playing about for a while, my code mysteriously starting working fine in IE. I suspect the problem may have been to do with something being cached, even though I'd cleared it. Thanks for the suggestion though, I never knew there was a .empty() function before! Chris