Ruby on Rails
Thursday, October 25, 2012
On Wednesday, October 24, 2012 7:40:24 PM UTC+1, Ruby-Forum.com User wrote:
Am having real probs trying to use Ajax with my Rails app. I have set up
a test as
follows:
in javascript file:
window.onload = function() {
$('#test').bind('ajax:success', function() {
alert("success");
};
}
This javascript is syntactically incorrect - you're not closing the parens you open just after "bind"
Also if you want to render nothing you do need to explicitly say that (eg render :nothing => true) or rails will complain that there is no template
Fred
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/c5f5jNuM62EJ.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment