Advertisement
Guest User

Untitled

a guest
Jul 5th, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.52 KB | None | 0 0
  1.                 $('#Search').ajaxForm({
  2.                  
  3.                     url: "../php/getArticle.php", // path to your script
  4.                     dataType: 'json',       //This makes sure the data is handled as JSON
  5.                     success: showResponse   //Call the function below if succeeded
  6.                 }) ;
  7.  
  8.               function showResponse(data)  {
  9.  
  10.                 $('#first').val(data.First);    //add the first value of the JSON data to the first element
  11.                 $('#second').val(data.Second);
  12.         [...]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement