Hey I am adding an onclick event to track clicks on certain videos, the 3rd party tool we are using is webtrends.
I am adding the onclick event and it works fine. The thing to note is the url in the link makes the user browse to a different url.
When I track the onclick event in httpfox I see the error NS_BINDING_ABORTED.
My jquery
$j(document).ready(function () {
$j('a.wt_video').click(function (e) {
var title = ($j(this).attr("title"));
if (title.length != 0) {
handleDynamicVideoWebTrendsClick(title);
}
});
});
Any ideas what I can add to prevent this error ?
I have found that we have to do two things to avoid the "Aborted" error.
1) use setTimeout 2) use mousedown - Especially for FireFox, because it views click as both mousedown and mouseup
$("#someBtn").live("mousedown", function(){
var mT7 = setTimeout("myFunction()", 50); // 1000 would be a second
});
var myFunction = function(){
var wtArgs = ['WT.dcs_id', 'youridgoeshere', 'DCSext.myFirstVar', varArray[varArray.length-2], 'DCSext.mySecondVar', varArray[varArray.length-1], 'DCSext.myThirdVar', tempArr[0]];
dcsMultiTrack.apply(this, wtArgs);
}
Hope that helps