Hi, 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