
Untitled
By: a guest on
Jul 5th, 2012 | syntax:
jQuery | size: 0.52 KB | hits: 27 | expires: Never
$('#Search').ajaxForm({
url: "../php/getArticle.php", // path to your script
dataType: 'json', //This makes sure the data is handled as JSON
success: showResponse //Call the function below if succeeded
}) ;
function showResponse(data) {
$('#first').val(data.First); //add the first value of the JSON data to the first element
$('#second').val(data.Second);
[...]