I have something like a comment box and I have a delete button like this for every comment.
When i click on the img to delete my comment it works well, but focuses on the TOP of the page.
Can I somehow focus it on the comment that I am about to delete, or can I only focus on the top or bottom of the page? I’m not sure if this is confusing…
<a href="#" onclick="deletedata('<?php echo $row['CommentID'];?>')"
style="color:#FF0000; float:right;margin-right:20px;">
<img src="images/trash.png" style="background:#FFFFFF" />
</a>
Add
return falseto the end of your Javascript statement to prevent the href from being followed: