added things
This commit is contained in:
		
							parent
							
								
									6d3ba1a714
								
							
						
					
					
						commit
						0ffd256672
					
				
					 25 changed files with 365 additions and 279 deletions
				
			
		| 
						 | 
				
			
			@ -1,23 +1,23 @@
 | 
			
		|||
// jQuery that will "listen" to the html niceSurvey.html
 | 
			
		||||
$(document).ready(function(){
 | 
			
		||||
$(document).ready(function() {
 | 
			
		||||
 | 
			
		||||
  $('form').on('submit', function(){
 | 
			
		||||
      
 | 
			
		||||
      // var item = $('form input');
 | 
			
		||||
      // console.log(item.serializeArray());
 | 
			
		||||
    $('form').on('submit', function() {
 | 
			
		||||
 | 
			
		||||
      $.ajax({
 | 
			
		||||
        type: 'POST',
 | 
			
		||||
        url: '/niceSurvey',
 | 
			
		||||
        data: $(this).serializeArray(),
 | 
			
		||||
        success: function(data){
 | 
			
		||||
          // do something with the data via front-end framework
 | 
			
		||||
          // Make the submit button red, disabled and saying Thank you
 | 
			
		||||
          $("#bb").css("background-color", "red");
 | 
			
		||||
          $("#bb").prop("disabled", "true");
 | 
			
		||||
          $("#bb").text("Thank you!");
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      return false;
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
        // var item = $('form input');
 | 
			
		||||
        // console.log(item.serializeArray());
 | 
			
		||||
 | 
			
		||||
        $.ajax({
 | 
			
		||||
            type: 'POST',
 | 
			
		||||
            url: '/survey',
 | 
			
		||||
            data: $(this).serializeArray(),
 | 
			
		||||
            success: function(data) {
 | 
			
		||||
                // do something with the data via front-end framework
 | 
			
		||||
                // Make the submit button red, disabled and saying Thank you
 | 
			
		||||
                $("#bb").css("background-color", "red");
 | 
			
		||||
                $("#bb").prop("disabled", "true");
 | 
			
		||||
                $("#bb").text("Thank you!");
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
        return false;
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue