I have two simple submit buttons on my form, which work just fine:
<button id="accept" type="submit" name="accept" value="accept">Accept</button>
<button id="decline" type="submit" name="decline" value="decline">Decline</button>
However, the page in question you can either view by going directly to the URL, or it is occasionally displayed in a modal dialog, which I have setup using the following jQuery:
dialog.dialog({
buttons: [
{
text: "Decline", click: function() {
$('#decline').click();
dialog.dialog('close');
}
},
{
text: "Accept", click: function() {
$('#accept').click();
dialog.dialog('close');
}
}
]
});
dialog.load(url + '&ajax=1');
This submits the form just fine, and it detects all post information apart from the element that was actually clicked. So for example, if you load the form, and click the #decline button, that information will be posted, this isn’t the case with jQuery.
Thanks
Careful with dialogs as they don’t make your submit action from your inputs wait. As soon as you click the submission is triggered.
You should use inputs of type button instead of submit and manage yourself the submission with the $(form).submit() method. It might solve your problems
EDIT: to answer your comment:
http://jsfiddle.net/techunter/KPu7G/
this is really raw, no css at all but you see the point.