jquery post request on click code example
Example 1: jquery post
$.post( "test.php", { name: "John", time: "2pm" })
.done(function( data ) {
alert( "Data Loaded: " + data );
});
Example 2: js ajax post strings
$.ajax({
type: "POST",
url: url,
data: data,
success: success,
dataType: dataType
});