Reputation: 1605
having a brain freeze today.
I'm looking to visit a URL to add tracking information just before my shopping cart gets redirected back to the main page (i.e. just after purchase).
I can't think how I could visit that URL without actually redirecting to my tracking page, and then redirecting again from there back to the homepage. Does anyone know?
This seems like it should be really easy, but I can't seem to get it working.
Thanks
Upvotes: 3
Views: 2967
Reputation: 19
How about using javascript:
function async_url_call(url) {
xmlHttp = GetXmlHttpObject();
if (xmlHttp == null) {
alert("Your browser does not support AJAX!");
return;
}
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
Upvotes: 0
Reputation: 41256
There are multiple ways:
Upvotes: 2
Reputation: 10463
Use the HttpWebClient to programattically visit a web page on the server side?
http://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.80).aspx
Upvotes: 2
Reputation: 8562
Are you familiar w/ JSON requests? You could hit a URL in the background (and feed it a few parameters) without actually loading a new page.
Upvotes: 1