I''ve got my site posting comments with ajax, but I can''t seem
to handle
the callback correctly.
Do I just put what I want returned in the "comments.rhtml" file?
I''ve
been trying to do this, but am having no luck.
If I have the parameters for the comments, I should be able to single
them out, but I''m not sure how to do it. This is what I mean:
<%=params[:comments]%> #returns name, site, comment, but not
individually.
How can I do this essentially (without getting errors),
<%=params[:comments.name]%>
<%=params[:comments.site]%>
<%=params[:comments.created_at]%>
<%=params[:comments.entry]%>
Also, when I try to use strftime in "comments.rhtml" it says that
it''s
undefined.
I don''t even know if the above things that I mentioned are even the
right way to go about it, I just don''t know how to do it.
The comments are saving to the database fine, but I have to refresh the
page to get it to show up. Also, I would like to use
"Effect.Appear(''new-comment'')" oncomplete. This
doesn''t seem to be
working either.
Can someone tell me how to display the comment after an Ajax submission?
Please HELP!
Thanks!
--
Posted via http://www.ruby-forum.com/.