On one of my pages, i make a remote request to the update action of my
school_subscribers controller with a jquery ajax call.

In my log, i can see that the action executes fine, and the
corresponding js.rjs file is evaluated (i'm logging from inside that
file and it all seems fine).  I can see in the firebug console that i
get a 200 back from the remote request.  But, the code in the js.rjs
file isn't actually executed.  I tried the simplest possible case of
having it just do

page.alert("hello")

but no joy.

I think that this is just a problem with how i have my jquery ajax
options set up - possibly the datatype option.  I tried omitting
datatype, and setting it to 'script', or 'html' but neither worked.

here's my call:

    function updateSubscriber(id, paramString){
      jQuery.ajax({
        async:true,
        type: "PUT",
        datatype: 'script',
        url: "/music_service/"+<%= @music_service.id
%>+"/school_subscribers/"+id,
        data: (paramString),
        error: function(msg){
          alert("Sorry, there was an error updating this subscriber");
        }
      });
    }

Can anyone see what i'm doing wrong?  Should i be using an ajax call in
this case?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to