I am trying to create a 'simple' GET request that pulls the content of a webpage back so that I can use data within the webpage at a later stage.
For some reason my code never enters the success function and I don't understand why the get request is always failing.
Hoping someone can notice something I haven't, or maybe I am just using the wrong approach?
Thanks in advance, here is my code:
$(function() {
$(".button").click(function() {
// validate and process form here
$.ajax({
type: "GET",
url: "http://www.mycarcheck.com/check/?reg_no=",
dataType: "html",
success:function(data)
{
alert(URL);
alert(data);
}
});
});
});