Posted By

tjhanley on 08/23/07


Tagged

ajax textmate request


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

hans
Anber
umang_nine


Prototype Ajax Request


 / Published in: JavaScript
 

  1. //Make the AJAX call
  2. var url = '';
  3. var params = encodeURI('');
  4. new Ajax.Request(url, {
  5. asynchronous: true,
  6. method: "get",
  7. parameters: params + 'type=eval',
  8. onSuccess: function(request){
  9. //evaluate
  10. eval(request.responseText);
  11. },
  12. onFailure: function(request){
  13.  
  14. }
  15. });

Report this snippet  

You need to login to post a comment.