Displaying 2 results from an estimated 2 matches for "tel_num".
Did you mean:
new_num
2006 Feb 02
4
ajax insertion into a form
...ate =>''telephone'', :position=> :after)
%>
<br/>
<%= text_field_tag ''telephone'' %></p>
<%= submit_tag "Create" %>
<%= end_form_tag %>
The controller :
def new
session[:num_tels]=0
end
def new_tel
@tel_num=session[:num_tels]
@tel_num=@tel_num.succ
session[:num_tels]=@tel_num
render (:text=>"<br/>"+@tel_num.to_s+''<input
id="telephone"''+@tel_num.to_s+'' name="telephone"+@tel_num.to_s
type="text" />'&...
2006 Feb 01
0
ajax and creation of a list
...>{: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.succ
render (:text=>"<br/>"+@tel_num.to_s+''<input
id="telephone"''+@tel_num.to_s+'' name="telephone" type="text" />'')
end
Several problem with this solution :
_ it doesn'&...