jeditable and dialog ui

jeditable and dialog ui

Hello,
I'm using Jeditable plugin and before submitting data, i make a controll in the function 'onsubmit'.
Within 'onsubmit' I open a dialog and I need to detect which button was clicked

onsubmit: function(settings, original) {
     ....
      $("#dialog").dialog('open');
      if (user clicks 'ok')
            I send some AJAX data via POST
            return true;
      else
            return false;
}

can someone tell me how do i do?
tnx