I have a list of items displayed in a DIV series. When someone clicks on the "edit" link, I want to replace the div with a form that allows them to correctly edit the contents of this element.
I am trying to think of an ideal way to handle this. Create a hidden edit form for each item in the list and link the edit link to open it, for example:
<div>
<a href="#">edit</a> Item One
<div id="edit_1202" class="editform">Edit form goes here</div>
</div>
<div>
<a href="#">edit</a> Item Two
<div id="edit_2318" class="editform">Edit form goes here</div>
</div>
Or is there a better way to get the data and paste the HTML form in the right place? Remember, I use jQuery, so I cannot use prototype helpers.
Thanks!
source
share