I have the following code that I use on links for delete scripts and it doesn’t seem to be working in IE, when you hit cancel it still follows though with the link. Firefox is fine. Is there something I need to change to allow it to work in all browsers?
onclick="return confirm('Are you sure you want to delete this?')"
return confirm('Do you really wanna delete this?');
This works in IE7.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
return window.confirm('Are you sure you want to delete this?');
<td>Some item with an id</td>
<td><a href="deleteScript.php?id=xxx" onclick="return confirmDelete();">Delete</a></td>
Thankyou, I have discovered that the code I use is working in IE when stripped out however I have something else stopping it from working correctly in my code, any idea how I can find out what might be causing this to continue though anyway?
I did some isolation testing and discovered the issue is http://www.flexigrid.info/ within jQuery… Anyone had this issue before and found a solution?
As I didn’t need this part I simply removed it.
var obj = (e.target || e.srcElement); if (obj.href || obj.type) return true;
if (p.singleSelect) $(this).siblings().removeClass('trSelected');