Hello. I am trying to add a custom ajax form that submits the register form to a java servlet but alltough the jquery code seems to run, the servlet never recieves the ajax call. I am recieving the "1" alert box, but the 'saveForm.do' never recieves anything. Are you overriding something? I inserted the code after the footer scripts.
$(document).ready(function(){
$("#register-form-submit").click(function( e ) { //fires when the user clicks the submit button
var form = $('#register-form'); //the form
$.ajax({
type: 'POST',
url: 'saveForm.do',
data: form.serialize(),
}).done(function(data) {
alert(1); //it shows !
}).fail(function(data) {
alert(0);
});
});
});
Thanks in advance.
