Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get response from form jquery

$('#form').submit(function(){
    $.ajax({
      url: $('#form').attr('action'),
      type: 'POST',
      data : $('#form').serialize(),
      success: function(){
        console.log('form submitted.');
      }
    });
    return false;
});
Comment

get response from form jquery

$('#myForm')
    .ajaxForm({
        url : 'myscript.php', // or whatever
        dataType : 'json',
        success : function (response) {
            alert("The server says: " + response);
        }
    })
;
Comment

PREVIOUS NEXT
Code Example
Javascript :: serve a file in express 
Javascript :: update table remove a key from json object mysql 
Javascript :: javascript how to sort nodes from dom 
Javascript :: javascript remove item from array in loop 
Javascript :: javascript split by newline 
Javascript :: Create slug from string in Javascript 
Javascript :: console regex 
Javascript :: leap year condition in javascript 
Javascript :: jqery slectt div in div 
Javascript :: vue input file image preview 
Javascript :: javascript rectangle collision 
Javascript :: update heroku 
Javascript :: stop next script when ajaxcall 
Javascript :: js touch relative pos 
Javascript :: nodejs error _.isNull is not a function 
Javascript :: fancybox 2 error image 
Javascript :: block enter key using jquery 
Javascript :: create a link javascript 
Javascript :: javascript trigger click on element 
Javascript :: bq show pretty json 
Javascript :: js remove json value duplicates 
Javascript :: node google client api to get user profile with already fetched token 
Javascript :: sort and split js alefbethic 
Javascript :: jquery add inline style 
Javascript :: jquery on scroll down 
Javascript :: javascript keep only letters in string 
Javascript :: next js update 
Javascript :: js add delay with promises 
Javascript :: ClassNotFoundException: com.fasterxml.jackson.core.JsonGenerator 
Javascript :: addeventlistener input 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =