Simple ajax request with prototype and json


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. new Ajax.Request('test4/data/retrievePicasaData.php?bounds='+ picasabounds, {
  2. method:'get',
  3. requestHeaders: {Accept: 'application/json'},
  4. onSuccess: function(transport){
  5. var json = transport.responseText.evalJSON(true);
  6. alert(json);
  7. }
  8. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.