Using jquery ui dialog to confirm action for form submission

Posted by redbluegreen on Stack Overflow See other posts from Stack Overflow or by redbluegreen
Published on 2010-03-10T21:31:08Z Indexed on 2010/05/28 18:22 UTC
Read the original article Hit count: 200

Filed under:
|

I have multiple forms on a page, for each of them I want the user to confirm before form submission. but when the user confirms to submit, how do I let this dialog know which form the user is sumbitting? Does it take custom parameters? Thanks.

$("#dialog-confirm").dialog({
        resizable: false,
        height:140,
        modal: true,
        buttons: {
            'Confirm submit': function() {
                document.______???????_____.submit();
            },
            Cancel: function() {
                $(this).dialog('close');
            }
        }
    });
$('.allForms').submit(function(){
      $('#dialog-confirm').dialog('open');
});

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about confirm