Hi,
Lets say I have a form with multiple task elements, for adding tasks to a project, and a link_to_function which inserts a new task using page.insert_html :partial eg: <div id="tasks">tasks holder</div> <%= link_to_function "Add Task" do |page| page.insert_html :bottom, :tasks, :partial => 'task', :object => @task.new end %>
I know when I do a render collection that each partial has a partial_name_counter variable eg: task_counter, but when I create a task using the javascript helper this variable no longer works because it defaults to 1 (as it was when the partial was rendered into the javascript query), is there anyway to get the same attribute using javascript?, or at least set a unique id to each task which is created using the javascript helper?
Thanks in advance. -Ivan