hi, I am try a ajax helper and the code is <%= link_to_remote "Check Time", :update => ''current_time'', :url => { :action => ''ncreate'' } %> <div id="current_time"> and in the action of ncreate i have written a textbox, i can get the text box but all that i need is when ever i click i need a new text box in the page. After first click text box1, after second click text box 2 something like this. -- regards, |Prashanth| --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If you user :update with a remote action then the contents of current_time will be updated each time you call this action. If you want a new text box to appear , then remove the :update option and create a ncreate.rjs file like this. page.insert_html :bottom, "current_time", "<input type=''text'' ..... />" On 7/29/07, Prashanth <munichlinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > hi, > > I am try a ajax helper and the code is > <%= link_to_remote "Check Time", > :update => ''current_time'', > :url => { :action => ''ncreate'' } %> > > <div id="current_time"> > > and in the action of ncreate i have written a textbox, i can get the > text box but all that i need is when ever i click i need a new text > box in the page. After first click text box1, after second click text > box 2 something like this. > > -- > regards, > > |Prashanth| > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 7/29/07, bandito <banditaras-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you user :update with a remote action then the contents of current_time > will be updated each time you call this action. > If you want a new text box to appear , then remove the :update option and > create a ncreate.rjs file like this. > > page.insert_html :bottom, "current_time", "<input type=''text'' ..... />" > >thanks i made it -- regards, |Prashanth| --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---