Last active
December 23, 2015 19:19
-
-
Save stormsson/6681588 to your computer and use it in GitHub Desktop.
JS - Jquery Ajax Updater
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.ajax('http://url.com',{ | |
dataType: 'html', | |
data: jQuery('#mainform').serialize(),// or array { data1 : 'value1',... } | |
success: function(data,textStatus,jqXHR) | |
{ | |
jQuery('#container_to_update').html(data); | |
}, | |
error: function (jqXHR,textStatus,errorThrown) | |
{ | |
jQuery('#message_container').html('Si e\' verificato un errore...'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment