Posted By

flipace on 09/16/11


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

jillella
spee66
logos


jQuery Ajax request


 / Published in: jQuery
 

  1. $(function(){
  2. $('#myajaxbutton').click(function(){
  3. $.ajax({
  4. url: '/index/dosomething',
  5. type: 'POST',
  6. data { givemethis : 'IT WORKS!' },
  7. dataType: 'json',
  8. success: function(msg){
  9. alert(msg.val);
  10. }
  11. });
  12. });
  13. });

Report this snippet  

You need to login to post a comment.