Hi.

New to jQuery, and am playing around with it, building a simple list
application in order to learn how to use the Ajax tools.

Currently, a user can add an element to the list, and it is stored in
the database using Ajax and then added to the DOM on the fly.

The next stage is adding delete buttons to the list elements. Now,
given my approach, it seems that for each list element I will have to:

(1) Write out the delete form on the fly
(2) Find the just-written delete form
(3) Ajaxify the delete from

this seems - well - clunky to me.

The code which adds the list element is right here:

currentItem = ' <form action="ajax_test.asp?mode=delete"
style="display:inline;"><input type="image" src="images/icons/
cancel.gif" id="' + j.items[0].item_id + '" /></form>';
$('#content p').append(currentItem);

Any suggestions on how this can be done? Or how this can be done
better? My reading suggests that there may be problems searching the
newly manipulated DOM. Is this true?

Thanks a ton!

-Jay Turley

Reply via email to