<div dir="ltr">David Clements helped a ton by pointing out that I didn&#39;t have the protect_from_forgery call in my application controller.&nbsp; 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">&lt;<a href="mailto:bdondo@gmail.com">bdondo@gmail.com</a>&gt;</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&#39;m trying to update a div with ajax using link_to_remote, but
can&#39;t seem to get it working.&nbsp; I can get form_remote_tag to work just
fine though. <br><br>My InfoController (it&#39;s not a RESTful controller) simply has:<br>
<br>&nbsp; def update_ajax<br>&nbsp;&nbsp;&nbsp; render :text =&gt; &#39;new text&#39;<br>&nbsp; end<br><br>And my view has:<br><br>&lt;p&gt;Ajax test - link_to_remote&lt;/p&gt;<br>&lt;%=link_to_remote(&#39;update it&#39;, <br>&nbsp; :update =&gt; &#39;foo&#39;,<br>


&nbsp; :url =&gt; info_ajax_update_url(:canvas =&gt; false) <br>) %&gt;<br>&lt;br/&gt;<br><br>&lt;p&gt;Ajax test 2 - form_remote_tag &lt;/p&gt;<br>&lt;% form_remote_tag&nbsp; :url =&gt; info_ajax_update_url(:canvas=&gt;<div dir="ltr">

false), <br>
:update=&gt;&quot;foo&quot; do |f|%&gt; <br>&lt;%= submit_tag &#39;Update&#39; %&gt;<br>&lt;% end %&gt;<br><br>&lt;div id=&#39;foo&#39;&gt;<br>&nbsp; Original text<br>&lt;/div<br><br>In my routes I have:<br><br>map.info_ajax_update &#39;info/update_ajax&#39;, :controller =&gt; &#39;info&#39;, :action =&gt; &#39;update_ajax&#39;<br>


<br>(if the above looks garbled, I&#39;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(&quot;parameters&quot;)] is undefined<br>


<br>Any ideas?&nbsp; Anyone have an example of working link_to_remote
usage?&nbsp; I searched this mailing list but didn&#39;t find anything that
works for me.<br><br>Thanks,<br><font color="#888888">Bryan</font></div></div>
</blockquote></div><br></div>