I'm having a strange issue that I've never encountered before.
I have a partial view that contains additional buttons for the page it's called from, which are simply:
<button id="editorApproveBtn" name="submitBtn" value="EditorAppove">Approve</button>
<button id="editorDenyBtn" name="submitBtn" value="EditorDeny">Deny</button>
These are additions to other buttons on the page called the same thing.
The other buttons are used for simple submits - saving the form content in 2 different ways, but these two bring up a jQuery Dialog, however, the dialogs show fine, but the form instantly submits when they've loaded.
Here's my dialog code:
$('#editorApproveBtn').button().click(function () {
$("#confirmApproveDialog").dialog({
bgiframe: true,
height: 200,
modal: true,
resizable: false,
width: 400,
buttons: {
'Yes': function () {
$(this).submit();
return false
},
'No': function () { $(this).dialog("close"); }
}
});
});
I've not a clue what's going on, I've never seen or heard of this behaviour with it before.
Has anyone else had this issue or know of a way to fix it? or have I made a mistake and it's caused it?
Thanks in advance for any help.