submite_to_remote not works for me

<% form_for :todo,:url =>todos_path,:html=>{:name=>"new_todo"} do |f| %>         <p>             <label>                 Title             </label>             <%= f.text_field :title,:class=>"validate[required,length [5,8]] text-input" %>         </p>         <p>             <label>                 Description             </label>             <%= f.text_area :description,:rows=>"4" %>         </p>         <p>             <label>                 Assign to             </label>             <%= select("todo","user_id",@users.map {|u| [u.login,u.id] }) %>         </p>                 <%=f.hidden_field :assigned_by,:value=>current_user.id %>     <%= submit_to_remote 'create_btn', 'Create', :url => { :action => 'new' } %> <% end %>

any suggestions about this code please let me know what is the error of this code.

Hi Nirosh,

<% form_for :todo,:url =>todos_path,:html=>{:name=>"new_todo"} do |f| %>

You need to use form_remote_for(...

HTH, Bill

thx to the reply that works for me

nirosh