Ajax requests with jQuery.post()
This is one of the reasons I still like jQuery. I’m sure all the new frameworks do similar stuff, but things like this are so simple with jQuery. Anyway, jQuery.post() is a shorthand Ajax function. It’s the equivalent of doing this: $.ajax({ type: “POST”, url: url, data: data, success: success, dataType: dataType }); So, with it, you can send an Ajax request this easily: var posting = $.post(url, data); Then, handle the response like this: posting.done(function(data) { // Handle data here }); Or, all together like this: $.post( “process.php”, function( data ) { $( “.result” ).html( data ); }); It