Nanwedar
06-15-2004, 10:29 AM
Hey all. I have the following:
<a href="delete.cfm" onclick="return confirm('Are you sure you want to delete this user?');">pic</a>
Even if I click Cancel on the confirmation popup, the form is being submitted.
I fixed this problem a while back by putting the confirm into the form's onSubmit handler, but I cannot do that in this case as there are too many other form elements that can also submit.
Anyone know how to solve this while keeping all the code inside the onclick handler?
Any insight greatly appreciated. Thanks!
<a href="delete.cfm" onclick="return confirm('Are you sure you want to delete this user?');">pic</a>
Even if I click Cancel on the confirmation popup, the form is being submitted.
I fixed this problem a while back by putting the confirm into the form's onSubmit handler, but I cannot do that in this case as there are too many other form elements that can also submit.
Anyone know how to solve this while keeping all the code inside the onclick handler?
Any insight greatly appreciated. Thanks!