This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 5th, 2012  |  syntax: jQuery  |  size: 0.52 KB  |  views: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.                 [...]
clone this paste RAW Paste Data