Adrie Donker
2008-Mar-24 19:50 UTC
With JS inserted input-tags are not passes as parameters to
I use this: function addBmw(){ tel = $(''bmws'').select(''div[id^=bmw]'').size(); // for a unique id bmw = $F(''sel_bmw'').split(''|''); // selected bmw => 54|Valery bmw_line = ''<div id="'' + ''bmw'' + (tel).toString() + ''">''; bmw_line += '' <img alt="delete" border="0px" src="/images/delete-icon.jpg" onclick="javascript:delBmw('' + (tel).toString() + '')" />''; bmw_line += ''<input style="position:relative;left:200px" id="event_employer_'' + bmw[0] + ''_opmerkingen" name="event_employer['' + bmw[0] + ''][comment]" size="60" type="text" />''; bmw_line += ''<label style="position:relative;right:380px"> '' + bmw[1] + ''</label>''; bmw_line += ''</div>''; Element.insert(''bmws'', {bottom: bmw_line}); } function delBmw(bmw_id){ Element.remove(''bmw'' + bmw_id) } With this client-side javascript I add input tags to a webpage, but when I submit the page, there are no parameters created for the input fields, when it is entering the controller???? Someone knows an answer? (or is it just working as designed?) TIA, Adrie -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Mar-24 19:55 UTC
Re: With JS inserted input-tags are not passes as parameters to
On 24 Mar 2008, at 19:50, Adrie Donker wrote:> > I use this: > > > > With this client-side javascript I add input tags to a webpage, but > when > I submit the page, there are no parameters created for the input > fields, > when it is entering the controller???? >Are your inserted html tags actually inserted in between the <form> tags ?> Someone knows an answer? (or is it just working as designed?) > > TIA, Adrie > -- > 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 -~----------~----~----~----~------~----~------~--~---
Adrie Donker
2008-Mar-24 20:34 UTC
Re: With JS inserted input-tags are not passes as parameters
Frederick Cheung wrote:> On 24 Mar 2008, at 19:50, Adrie Donker wrote: > >> > Are your inserted html tags actually inserted in between the <form> > tags ?Yes, sure they are! Thanks for the reply, I''m really stuck with this problem, I tried it without JS, but with a partial, but with the same result: newly added inputs are NOT returned to my controller!!! Someone else has a clue? TIA, Adrie -- 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 -~----------~----~----~----~------~----~------~--~---