I have a form tag originaly generated using form_remote_tag. After a lot of bewildered testing to see why its values arent being passed on, I realised when looking at the html output that the form has a closing tag on the end (before the form fields). So I thought maybe its a rails bug, and copied and pasted the generated version back into my rhtml file, commenting out the original helper call. Still the same. Tried reordering things in the page. No joy. I ran a test on another form in the page to check I hadnt lost the plot, and that worked fine. Any help much appreciated! Here is my rhtml code:_____________________________________________________ <form action="/invoice/filter_render" method="post" onsubmit="Element.show(''spinner''); new Ajax.Updater(''invoice_list_tbody'', ''/invoice/filter_render'', {asynchronous:true, evalScripts:true, onSuccess:function(request){Element.hide(''spinner'')}, parameters:Form.serialize(this)}); return false;"> <%#= form_remote_tag(:update => "invoice_list_tbody", # :before => "Element.show(''spinner'')", # :success => "Element.hide(''spinner'')", # :url => { :action => :filter_render }) %> <tr> <td>Date</td> <td> <input type="hidden" id="hiddenval" name="hiddenval" value="test"/> <select id="date_dropdown" name="date_dropdown"> <option value="all">All</option> <option value="issued">Issued</option> <option value="due">Due</option> <option value="received">Received</option> </select> </td> <td>From</td> <td> <input type="text" name="f_date_a" id="f_date_a" /><button type="reset" id="f_trigger_a">...</button> </td> </tr> <tr> <td></td> <td></td> <td>To</td> <td><input type="text" name="f_date_b" id="f_date_b" /><button type="reset" id="f_trigger_b">...</button> <%= submit_tag "Show date range" %></td> </tr> </form> ________________________________________________________________________ and the generated code:____________________________________________________ <form action="/invoice/filter_render" method="post" onsubmit="Element.show(''spinner''); new Ajax.Updater(''invoice_list_tbody'', ''/invoice/filter_render'', {asynchronous:true, evalScripts:true, onSuccess:function(request){Element.hide(''spinner'')}, parameters:Form.serialize(this)}); return false;"></form> <tr> <td>Date</td> <td> <input id="hiddenval" name="hiddenval" value="test" type="hidden"> <select id="date_dropdown" name="date_dropdown"> <option value="all">All</option> <option value="issued">Issued</option> <option value="due">Due</option> <option value="received">Received</option> </select> </td> <td>From</td> <td> <input name="f_date_a" id="f_date_a" type="text"><button type="reset" id="f_trigger_a">...</button> </td> </tr> <tr> <td></td> <td></td> <td>To</td> <td><input name="f_date_b" id="f_date_b" type="text"><button type="reset" id="f_trigger_b">...</button> <input name="commit" value="Show date range" type="submit"></td> </tr> <tr> <td></td> <td> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You''ve commented out the closing parenthesis on the <%=form_remote_tag(... I had the same problem a couple weeks ago, and it took me forever to figure out what went wrong. On Dec 12, 6:29 am, "adam" <adam.elemen...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a form tag originaly generated using form_remote_tag. After a > lot of bewildered testing to see why its values arent being passed on, > I realised when looking at the html output that the form has a closing > tag on the end (before the form fields). > > So I thought maybe its a rails bug, and copied and pasted the generated > version back into my rhtml file, commenting out the original helper > call. Still the same. Tried reordering things in the page. No joy. I > ran a test on another form in the page to check I hadnt lost the plot, > and that worked fine. > > Any help much appreciated! > > Here is my rhtml > code:_____________________________________________________ > > <form action="/invoice/filter_render" method="post" > onsubmit="Element.show(''spinner''); new > Ajax.Updater(''invoice_list_tbody'', ''/invoice/filter_render'', > {asynchronous:true, evalScripts:true, > onSuccess:function(request){Element.hide(''spinner'')}, > parameters:Form.serialize(this)}); return false;"> > <%#= form_remote_tag(:update => "invoice_list_tbody", > # :before => "Element.show(''spinner'')", > # :success => "Element.hide(''spinner'')", > > # :url => { :action => :filter_render }) > %> > <tr> > <td>Date</td> > <td> > <input type="hidden" id="hiddenval" name="hiddenval" > value="test"/> > <select id="date_dropdown" name="date_dropdown"> > <option value="all">All</option> > <option value="issued">Issued</option> > <option value="due">Due</option> > <option value="received">Received</option> > </select> > </td> > <td>From</td> > <td> > <input type="text" name="f_date_a" id="f_date_a" > /><button type="reset" id="f_trigger_a">...</button> > </td> > </tr> > <tr> > <td></td> > <td></td> > <td>To</td> > <td><input type="text" name="f_date_b" id="f_date_b" /><button > type="reset" id="f_trigger_b">...</button> > <%= submit_tag "Show date range" %></td> > </tr> > </form> > ________________________________________________________________________ > > and the generated > code:____________________________________________________ > > <form action="/invoice/filter_render" method="post" > onsubmit="Element.show(''spinner''); new > Ajax.Updater(''invoice_list_tbody'', ''/invoice/filter_render'', > {asynchronous:true, evalScripts:true, > onSuccess:function(request){Element.hide(''spinner'')}, > parameters:Form.serialize(this)}); return false;"></form> > > <tr> > <td>Date</td> > <td> > > <input id="hiddenval" name="hiddenval" value="test" > type="hidden"> > <select id="date_dropdown" name="date_dropdown"> > <option value="all">All</option> > <option value="issued">Issued</option> > <option value="due">Due</option> > <option value="received">Received</option> > </select> > </td> > > <td>From</td> > <td> > <input name="f_date_a" id="f_date_a" > type="text"><button type="reset" id="f_trigger_a">...</button> > </td> > </tr> > <tr> > <td></td> > <td></td> > > <td>To</td> > <td><input name="f_date_b" id="f_date_b" type="text"><button > type="reset" id="f_trigger_b">...</button> > <input name="commit" value="Show date range" type="submit"></td> > </tr> > > <tr> > <td></td> > <td>--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks, but I dont get it - I''m not even using the rails helper anymore (its all commented out), and its still putting the closing form tag right after the opening tag. On 12/12/06, Zack McCoy <zachary.mccoy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > You''ve commented out the closing parenthesis on the > <%=form_remote_tag(... > > I had the same problem a couple weeks ago, and it took me forever to > figure out what went wrong. > > On Dec 12, 6:29 am, "adam" <adam.elemen...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have a form tag originaly generated using form_remote_tag. After a > > lot of bewildered testing to see why its values arent being passed on, > > I realised when looking at the html output that the form has a closing > > tag on the end (before the form fields). > > > > So I thought maybe its a rails bug, and copied and pasted the generated > > version back into my rhtml file, commenting out the original helper > > call. Still the same. Tried reordering things in the page. No joy. I > > ran a test on another form in the page to check I hadnt lost the plot, > > and that worked fine. > > > > Any help much appreciated! > > > > Here is my rhtml > > code:_____________________________________________________ > > > > <form action="/invoice/filter_render" method="post" > > onsubmit="Element.show(''spinner''); new > > Ajax.Updater(''invoice_list_tbody'', ''/invoice/filter_render'', > > {asynchronous:true, evalScripts:true, > > onSuccess:function(request){Element.hide(''spinner'')}, > > parameters:Form.serialize(this)}); return false;"> > > <%#= form_remote_tag(:update => "invoice_list_tbody", > > # :before => "Element.show(''spinner'')", > > # :success => "Element.hide(''spinner'')", > > > > # :url => { :action => :filter_render }) > > %> > > <tr> > > <td>Date</td> > > <td> > > <input type="hidden" id="hiddenval" > name="hiddenval" > > value="test"/> > > <select id="date_dropdown" > name="date_dropdown"> > > <option > value="all">All</option> > > <option > value="issued">Issued</option> > > <option > value="due">Due</option> > > <option > value="received">Received</option> > > </select> > > </td> > > <td>From</td> > > <td> > > <input type="text" name="f_date_a" id="f_date_a" > > /><button type="reset" id="f_trigger_a">...</button> > > </td> > > </tr> > > <tr> > > <td></td> > > <td></td> > > <td>To</td> > > <td><input type="text" name="f_date_b" > id="f_date_b" /><button > > type="reset" id="f_trigger_b">...</button> > > <%= submit_tag "Show date range" > %></td> > > </tr> > > </form> > > ________________________________________________________________________ > > > > and the generated > > code:____________________________________________________ > > > > <form action="/invoice/filter_render" method="post" > > onsubmit="Element.show(''spinner''); new > > Ajax.Updater(''invoice_list_tbody'', ''/invoice/filter_render'', > > {asynchronous:true, evalScripts:true, > > onSuccess:function(request){Element.hide(''spinner'')}, > > parameters:Form.serialize(this)}); return false;"></form> > > > > <tr> > > <td>Date</td> > > <td> > > > > <input id="hiddenval" name="hiddenval" > value="test" > > type="hidden"> > > <select id="date_dropdown" > name="date_dropdown"> > > <option > value="all">All</option> > > <option > value="issued">Issued</option> > > <option > value="due">Due</option> > > <option > value="received">Received</option> > > </select> > > </td> > > > > <td>From</td> > > <td> > > <input name="f_date_a" id="f_date_a" > > type="text"><button type="reset" id="f_trigger_a">...</button> > > </td> > > </tr> > > <tr> > > <td></td> > > <td></td> > > > > <td>To</td> > > <td><input name="f_date_b" id="f_date_b" > type="text"><button > > type="reset" id="f_trigger_b">...</button> > > <input name="commit" value="Show date > range" type="submit"></td> > > </tr> > > > > <tr> > > <td></td> > > <td> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sorry, obviously I didn''t read carefully enough the first time... Have you tried creating a temporary view with only that code in it to see what happens? I''ve been trying to recreate your problem, but I can''t. I''ve tried the generated html with the comments and the original code with the helper tag uncommented and the </form> appears in the right places both times. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
No problem, might have to just dissect the whole page a bit more... Cheers On 12/12/06, Zack McCoy <zachary.mccoy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Sorry, obviously I didn''t read carefully enough the first time... > > Have you tried creating a temporary view with only that code in it to > see what happens? I''ve been trying to recreate your problem, but I > can''t. I''ve tried the generated html with the comments and the original > code with the helper tag uncommented and the </form> appears in the > right places both times. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---