page update


    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.

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