Forum: Ruby on Rails page update

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0914fc7759f110fb35e13f79236e94a1?d=identicon&s=25 Prashanth (Guest)
on 2007-07-29 07:51
(Received via mailing list)
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|
3b4506ae582cefb19270ac601c302bf0?d=identicon&s=25 bandito (Guest)
on 2007-07-29 12:26
(Received via mailing list)
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' .....  />"
0914fc7759f110fb35e13f79236e94a1?d=identicon&s=25 Prashanth (Guest)
on 2007-07-29 14:22
(Received via mailing list)
On 7/29/07, bandito <banditaras@gmail.com> 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|
This topic is locked and can not be replied to.