Displaying 2 results from an estimated 2 matches for "new_tel".
Did you mean:
new_el
2006 Feb 02
4
ajax insertion into a form
...art_form_tag :action => ''create'' %>
<%= render_partial ''form'' %>
<p><label for="telephone">Telephone</label>
<%= link_to_remote("Add a number",
:url=>{:action=>''new_tel''},
:update =>''telephone'', :position=> :after)
%>
<br/>
<%= text_field_tag ''telephone'' %></p>
<%= submit_tag "Create" %>
<%= end_form_tag %>
The controller :
def new
s...
2006 Feb 01
0
ajax and creation of a list
...ser.
What I have done :
in the view :
<%= start_form_tag :action => ''create'' %>
<p><label for="telephone">Telephone</label>
<%= link_to_remote("Add another number",
:url=>{:action=>''new_tel''},
:update =>''telephone'', :position=> :after)
%>
<br/>
<%= text_field_tag ''telephone'' %></p>
<%= end_form_tag %>
in the controller :
def new_tel
@tel_num||=0
@tel_num=@tel_num...