Forum: Ruby on Rails Ajax problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
60bb25c88eda9e783e1d22653e26f86d?d=identicon&s=25 Smarty 2k (smartee)
on 2008-11-25 13:32
hi friends....

my rhtml page is:



<td>Post Blog</span></td>
<%= form_remote_tag(:update => "my_list",
                       :url => { :action => :preview_blog },
                       :position => "top" ) %>
<td><textarea class="textareapost" name="blog"></textarea></td>
<td>
 <%= link_to_remote(image_tag("../images/post_blog.gif", :border => 0),
       :update => "save",:url =>{ :action => :save })%>
   </td>
 <td>
 <input type="image" alt="Post Blog" src="../images/create.gif"
border="0"></td>


<div id="my_list" class="empty">

</div>

form_remote_tag is working fine. but link_to_remote not working!!!!!

please help me...

Thanks..
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-11-25 13:45
(Received via mailing list)
On 25 Nov 2008, at 12:32, Smarty 2k wrote:

>                       :position => "top" ) %>
> <div id="my_list" class="empty">
>
> </div>
>
> form_remote_tag is working fine. but link_to_remote not working!!!!!
>
"not working", in the absence of clarifications as to what that means,
is the most useless thing you can write in a message to a mailing list.

In this particular case it could mean:
- no ajax call is made
- an ajax call is made but with the wrong parameters
- a seemingly correct call is made but it isn't routed properly
- my controller raises some error (if so what error)
- the side effects I wanted (record changed in the database etc...)
don't appear to have happened
- the rjs in my controller/view hasn't done the right thing
- after the ajax call completes the page doesn't update the way I want/
at all.

Fred
2d8132658d56e51f19ace1c68e48b6aa?d=identicon&s=25 Thorsten Mueller (thorsten)
on 2008-11-25 13:47
(Received via mailing list)
not working would mean:

- It's not calling the controller action
- Is calling the controller action, but not responding
- Responding but not updating html-tag with id "save" (which exists,
of course)
- do something totally weird like ordering a pizza?
This topic is locked and can not be replied to.