ajax json params 4 rails


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



Copy this code and paste it in your HTML
  1. Jquery:
  2.  
  3. var json_obj = {
  4. "variable":anystring
  5. }
  6.  
  7. $.ajax({
  8. type: "GET",
  9. url: 'ajax/action',
  10. data: json_obj,
  11. success: function(msg){
  12. alert(msg)
  13. }
  14. })
  15.  
  16.  
  17. result = params[:variable]

URL: http://almazom.livejournal.com/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.