I have read just about every post on the subject that I can find here and I'm just not seeing what I'm doing wrong.
CODE:
<?php
// This is a test of a confirm dialog.
if(isset($_POST['delete'])){
echo "Delete something";
}
?>
<html>
<head>
<title>Confirm Test</title>
</head>
<body>
<form method="post">
<input type="submit" name="delete" value="Delete" onclick="return confirm('Are you sure you want to do delete item?')">
</form>
</body>
</html>
Now this simple test works but in my page it doesn't. Strange as it works else where in the site and the structure of the page doesn't appear to be any different. When the input button is pressed no confirm dialog appears and the page just reloads.
The page where it is not working is more complicated of course then what is above but it is basically the same. The code above for the most part is cut from it. If I cut and paste the test code into the body of the page it no longer works as it does in the test. No dialog is ever presented.
Hard question to answer I know but a point in the right direction to know what I can test and look for would be great.