Hello all, I''m using a form_remote_tag as: <% form_remote_tag(:update=>"statdiv",:url => { :controller=>:ticket,:action => :status }) do %> <table width="100%" height="100%" class="loginbox"> <tr> <td> E-mail </td> <td> <%= text_field ''ticket'', ''email'' ,''id''=>''email'' , :size=>30,:maxlength=>30,:class=>"field" %> </td> </tr> <tr> <td> <%= submit_tag "View Status" ,:class=>"bttn" ,:onclick=>"return statuscheck();" %> </td> </tr> </table> <%end %> <div id="statdiv"> </div> The problem I''m facing is that the from_remote_tag just inserts the /ticket/status.rhtml text into the ''statdiv'' div each time instead of updating it. It does not clear the ''statdiv'' each time "View Status" button is pressed.So if there is text from the previous from submit in ''statdiv'', it remains as it is and new text is inserted above it into the ''statdiv''. What I want is that the ''statdiv'' should be cleared each time of its old text. Is from_remote_tag not the right option for this??? Please help. Thank you. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I think, the /ticket/status.rhtml contain a tag with the id as "statdiv". Check-it-out. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Siddick Ebramsha wrote:> I think, the /ticket/status.rhtml contain a tag with the id as > "statdiv". > Check-it-out.Thanks for the reply. I tried it but things are the same.... :( The div does not get updated... -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am not Giving the correct solution, but it will work. Solution :- form_remote_tag(:update=>"statdiv",:url => { :controller=>"test",:action => "status" }, :before => "$(''statdiv'').update('''');" ) -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Siddick Ebramsha wrote:> I am not Giving the correct solution, but it will work. > > Solution :- > form_remote_tag(:update=>"statdiv",:url => { > :controller=>"test",:action => "status" }, :before => > "$(''statdiv'').update('''');" )Hey thank you so much for your solution but I got it working by: <% form_remote_tag(:url => { :controller=>:ticket,:action => :status },:update=>"statdiv") do %> What I needed to do is to specify the :url before the :update... :) Thanks anyways. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---