Patrick Doyle wrote:
> In my controller, I have:
>
> respond_to do |format|
> format.html # index.html.erb
> format.xml { render :xml => @documents }
> format.js do
> render :update do |page|
> page.replace_html('documents_table',
> :partial => 'documents_table',
> :locals => {:documents => @documents})
> end
> end
> end
>
> In index.html.erb, I have
>
> <div id="documents_table">
> <%= render :partial => 'documents_table', :locals => {:documents =>
> @documents} %>
> </div>
hi Patrick Doyle,
Thx for you reply.I have tried according to your code
but it don't display result but shows the
javascript code with the result. Below is the javascript that output in
the html page when I click the next link.
try { Element.update("votedtop20", " \n\n\n\n\n
\n \n \n hjbnj\n \n
\n \n
\n\n"); } catch (e) { alert('RJS error:\n\n' + e.toString());
alert('Element.update(\"votedtop20\", \" \\n\\n\\n\\n\\n
\\n \\n \\n hjbnj\\n \\n
\\n \\n
\\n\\n\");'); throw e }
Please help me.Thx in advance.
Amin
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---