Reputation: 284
I am deleting a row from a table but before deleing i want a confirmation msg. I tried using onclick and onsubmit return confirm()
but its not working. Any help would be nice.
echo '<td><a href="#" title="Delete" rel='.$row['IO_ID'].' onsubmit="return confirm("Really Delete?"); class="button red">
</a></td>';
Upvotes: 2
Views: 52
Reputation: 2866
You have syntax errors in your echo. This works:
<table>
<tr>
<td><a href="#" title="Delete" rel='.$row['IO_ID'].' onsubmit="return confirm('Really Delete?');" class="button red">test
</a>
</td>
</tr>
</table>
Upvotes: 1