Posted By

almazom on 10/07/09


Tagged

railsajaxjson


Versions (?)

ajax json params 4 rails


 / Published in: Rails
 

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

  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]

Report this snippet  

You need to login to post a comment.