I\'m trying to automatically run an ajax url when my page is fully loaded using .load() function. It seems my code doesn\'t work.
Other information:
<
This is completely working but just shows this error:
XMLHttpRequest cannot load https://shareasale.com/sale.cfm?amount=99.00&tracking=15&transtype=sale&merchantID=49748. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
This might not work from yout local host but will work properly from any server.
And still there is any error try this code:
$(document).ready(function(){
$.ajax({
url:'https://shareasale.com/sale.cfm?amount=99.00&tracking=15&transtype=sale&merchantID=49748',
success:function(data)
{
alert(data);
}
})
});