Hii I need to add textbox dynamically when I click "Add" button. On clicking on button the textboxes are to be displayed one below the other. I enter different text in different textboxes, when clicked submit button all the content in all the textboxes should be saved. How can I achive this functionality? 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, May 27, 2010 at 8:04 AM, Ravi Dtv <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I need to add textbox dynamically when I click "Add" button.> How can I achive this functionality?A client-side action like this is done with JavaScript. A JS library like Prototype or jQuery can be helpful, but you still have to write the code :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 May 2010 16:35, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, May 27, 2010 at 8:04 AM, Ravi Dtv <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >> I need to add textbox dynamically when I click "Add" button. > >> How can I achive this functionality? > > A client-side action like this is done with JavaScript. > > A JS library like Prototype or jQuery can be helpful, but you still have > to write the code :-)Or AJAX could be used. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, May 27, 2010 at 9:09 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:>> A client-side action like this is done with JavaScript.> Or AJAX could be used.Which is still JavaScript, but with a pointless (in this case) round-trip to the server :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 May 2010 17:20, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, May 27, 2010 at 9:09 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >>> A client-side action like this is done with JavaScript. > >> Or AJAX could be used. > > Which is still JavaScript, but with a pointless (in this case) round-trip > to the server :-)It is probably correct that the round trip to the server is pointless, but not necessarily, we do not know enough about the requirement. Maybe the text boxes to be added depend on data the user has entered and in data in the database in some way that would make AJAX more appropriate. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, May 27, 2010 at 9:35 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> It is probably correct that the round trip to the server is pointless, > but not necessarily, we do not know enough about the requirement. > Maybe the text boxes to be added depend on data the user has entered > and in data in the database in some way that would make AJAX more > appropriate.Of course that''s possible, but if so certainly not apparent in the OP''s description of the task. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
http://railscasts.com/episodes/75-complex-forms-part-3 that might help On May 27, 10:04 am, Ravi Dtv <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hii > > I need to add textbox dynamically when I click "Add" button. > > On clicking on button the textboxes are to be displayed one below the > other. > > I enter different text in different textboxes, when clicked submit > button all the content in all the textboxes should be saved. > > How can I achive this functionality? > > Please help. Thank you. > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
chewmanfoo wrote:> http://railscasts.com/episodes/75-complex-forms-part-3 > > that might helpThanks chewmanfoo, this is what the functionality Im looking for. Thanks all for replying. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.