KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to replace the content of a div after clicking on a link using Rails 3, remote_link :remote => true and jQuery. So far, I've been able to get the controller render the correct partial while responding with a 200 HTTP code. I've set some callbacks to find the origin of the problem: jQuery(function($) { $("#follow-link").bind("ajax:before", function() { console.log("ajax:before"); }); $("#follow-link").bind("ajax:success", function(data, status, xhr) { console.log("ajax:success"); }); $("#follow-link").bind("ajax:complete", function() { console.log("ajax:complete"); }); $("#follow-link").bind("ajax:error", function(xhr, status, error) { console.log("ajax:error"); console.log(error); }); }); While before and complete are triggered, success is not and error outputs "parsererror". The content I get when I inspect the response in Safari's developers tools is a simple string. Why would it raise a parsererror? How can I get more information about what's causing this error?
Tags (comma-separated)
Save Edits
Cancel