Reputation: 10552
I have a form which on submit I want to run a script via Ajax, but for some reason it is returning an error. Any idea what is wrong? My code is as following:
$('.spiderform').submit(function (event) {
event.preventDefault();
alert($(this).serialize());
$.ajax({
type: 'get',
url: 'http://spidertest.epiphanydev1.co.uk/spider/?'+$(this).serialize(),
beforeSend: function() {
alert('sending form');
},
success: function() {
alert('worked');
},
error: function(jon) {
alert('error');
}
});
});
Thanks
Upvotes: 0
Views: 272
Reputation: 943134
Since you haven't given any idea what error is is, but since you have an absolute URI in there, I'd guess you are running into the Same Origin Policy.
Upvotes: 4