I''m trying to use the form_remote_tag for the first time.. Here is my code: <%= form_remote_tag(:url => { :action => ''add'' } ) %> <td size=''100''><%= text_field_tag ''name'' %></td> <td size=''200''><%= text_field_tag ''email'' %></td> <td id=''submit''><%= submit_tag ''icon_additem.gif'' %></td> <%= end_form_tag %> For whatever reason this is not submitting any of my params... The log shows no params being sent. Env is OSX 10.4 + Lighttpd + Safari/Firefox/Camino. Any clue what is wrong?? I''m trying to do a demo in 30min without any luck. Thanks. Josh
Josh Knowles wrote:> <%= form_remote_tag(:url => { :action => ''add'' } ) %> > <td size=''100''><%= text_field_tag ''name'' %></td> > <td size=''200''><%= text_field_tag ''email'' %></td> > <td id=''submit''><%= submit_tag ''icon_additem.gif'' %></td> > <%= end_form_tag %> > > For whatever reason this is not submitting any of my params... The log > shows no params being sent.Make sure your form_remote_tag/end_form_tag pair is placed outside any <table> tags. -- We develop, watch us RoR, in numbers too big to ignore.
On 5/7/06, Mark Reginald James <mrj@bigpond.net.au> wrote:> > Make sure your form_remote_tag/end_form_tag pair is placed > outside any <table> tags.Mark, thanks for your reply. This makes no sense why these tags would have to be outside the table tag. Also, I was unable to insert a row into the table using RJS. Is this just a fact of life with tables? I know that I should be using div/css but are these problems documented anywhere? I''m assuming its not just a Rails thing and I''d like to know more about what causes this problem. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060507/79352701/attachment.html
Josh Knowles wrote:> Mark, thanks for your reply. This makes no sense why these tags would > have to be outside the table tag. Also, I was unable to insert a row > into the table using RJS. Is this just a fact of life with tables? I > know that I should be using div/css but are these problems documented > anywhere? I''m assuming its not just a Rails thing and I''d like to know > more about what causes this problem.Forms inside tables is a HTML issue. You can''t place a form tag at a position at which only a thead, tbody, th, tr, or td tag is allowed. You can however place a form inside a td, possibly followed by a nested table. Your inability to insert a row using RJS is probably an Internet Explorer issue. I''ve read that people have had success when using the Taconite extension for Prototype: http://taconite.sourceforge.net/ -- We develop, watch us RoR, in numbers too big to ignore.
Mark Reginald James wrote:> > Forms inside tables is a HTML issue. You can''t place a form tag at a > position at which only a thead, tbody, th, tr, or td tag is allowed. You > can however place a form inside a td, possibly followed by a nested > table. > > Your inability to insert a row using RJS is probably an Internet > Explorer > issue. I''ve read that people have had success when using the Taconite > extension for Prototype: http://taconite.sourceforge.net/ > > -- > We develop, watch us RoR, in numbers too big to ignore.Thanks, I too was having this problem. But I too am confused about the cause of the problem. My code was very similar to Josh''s, but I then went back and replaced my form_remote_tag with an equivalent form_tag (removing the AJAX), and the params were posted properly. So it doesn''t seem to be solely a HTML issue with forms. It seems like it is an issue with AJAX, HTML and forms. Any thoughts on why it works with a regular form_tag? -Ryan -- 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 -~----------~----~----~----~------~----~------~--~---
Ryan, I had a problem that seems similar to yours. After hacking at it for **way** too much time, I figured it out. If it''s at all helpful, here''s the posting: http://www.ruby-forum.com/topic/79293#new - David -- 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 -~----------~----~----~----~------~----~------~--~---