Weird problem submitting custom ajax form

2 replies · opened Jul 18, 2016

PpvaccarezzaJul 18, 2016

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.

SSemicolon WebSTAFFJul 19, 2016

Hello,

You can surely use your own Custom Forms and we do not add any overriding codes. Can you please provide us with a Live URL so that we can check out the exact issue and provide you with a more accurate solution for this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

PpvaccarezzaJul 19, 2016

Sorry, there was something wrong with the server environment. Its already working now. Please ignore.

Thanks anyway!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard