I've got a click tracking AJAX function (calls a WebMethod
on an .aspx
page), and I need to call it when the user clicks through to a link.
Unfortunately, I'm using window.location = "newUrl"
to change the page, which seems to make the AJAX call fail. Is there a way around this?
I do not need to get any information back from the AJAX call, I just need to make sure the WebMethod
is called.
I'm aware that I could just redirect on the success()
or failure()
calls, but then I would have to wait for the clickTracking()
method to run, which takes ~ 1s
. That is not acceptable by the agreement in the project spec, and so is not a viable solution.