<div dir="ltr">David Clements helped a ton by pointing out that I didn't have the protect_from_forgery call in my application controller. Everything works great now...<br><br>Thanks Dave!<br><br>Bryan<br><br><br><div class="gmail_quote">
On Mon, Aug 11, 2008 at 8:56 AM, Bryan <span dir="ltr"><<a href="mailto:bdondo@gmail.com">bdondo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi, I'm trying to update a div with ajax using link_to_remote, but
can't seem to get it working. I can get form_remote_tag to work just
fine though. <br><br>My InfoController (it's not a RESTful controller) simply has:<br>
<br> def update_ajax<br> render :text => 'new text'<br> end<br><br>And my view has:<br><br><p>Ajax test - link_to_remote</p><br><%=link_to_remote('update it', <br> :update => 'foo',<br>
:url => info_ajax_update_url(:canvas => false) <br>) %><br><br/><br><br><p>Ajax test 2 - form_remote_tag </p><br><% form_remote_tag :url => info_ajax_update_url(:canvas=><div dir="ltr">
false), <br>
:update=>"foo" do |f|%> <br><%= submit_tag 'Update' %><br><% end %><br><br><div id='foo'><br> Original text<br></div<br><br>In my routes I have:<br><br>map.info_ajax_update 'info/update_ajax', :controller => 'info', :action => 'update_ajax'<br>
<br>(if the above looks garbled, I've put it up on pastie as well: <a href="http://pastie.textmate.org/250092" target="_blank">http://pastie.textmate.org/250092</a> )<br><br>Firebug gives me this error: a5279184xxx_options[idx("parameters")] is undefined<br>
<br>Any ideas? Anyone have an example of working link_to_remote
usage? I searched this mailing list but didn't find anything that
works for me.<br><br>Thanks,<br><font color="#888888">Bryan</font></div></div>
</blockquote></div><br></div>