My code as follows. Seems I can not precisely locate the input tag with name delete[]. Thanks.
<div id="rc1" class="actionitem">
<fieldset>
<legend>Action Item</legend>
<table>
</table>
<input type="hidden" value="" name="aid[]">
<input type="hidden" value="" name="delete[]">
<button onclick="remove(this);" type="button">Remove</button>
</fieldset>
</div>
<script>
function remove(element){
if (confirm("Please press OK to confirm")) {
$(element).parent().find('delete').val('1');
$(element).parent().parent().slideUp('slow', function() {
$(element).parent().parent().hide();
});
}
}
</script>
Instead of
Why dont you try the selector syntax like