Return confirm - not working in IE

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?')"

I also tried the following using JavaScript, the same thing happens, cancel still follows though with the script.

	return confirm('Do you really wanna delete this?');

This works in IE7.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="">
        <script type="text/javascript">
            function confirmDelete(){
                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 within jQuery… Anyone had this issue before and found a solution?

I have found the issue, within flexgrid.js there is the following code basically changing the table row class on click which seemed to override my JavaScript.

As I didn’t need this part I simply removed it.


	function (e)
			var obj = ( || e.srcElement); if (obj.href || obj.type) return true;
			if (p.singleSelect) $(this).siblings().removeClass('trSelected');