<?php $id=$_REQUEST['CID']+1; ?> <div style="float:left;width:100%"> <input type="text" style="width:120px;" name="document_submitted[]" /><a href='javascript: if(confirm("Are You Sure?")) { removeElement("myDiv","my<?php echo $id; ?>myDiv"); }'><img src="images/delete.png" style="border:none;" width="10" height="10" /></a></div> </div>