Just remove type="submit"
from your button and let your jQuery ajax call be triggered first. Once you get the response then you can submit your form as well. Something like this;
function your_action_javascript() {
?>
<script type="text/javascript" >
jQuery(document).ready(function($) {
$('.button').on('click', function () {
var data = {
'action': 'your_action'
};
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
$.post(ajaxurl, data, function(response) {
// getting response from your ajax callback function
alert('Got this from the server: ' + response);
// submitting form after getting response
$('#your_form_id').submit();
});
});
});
</script>
<?php
}
// Hook this function to admin footer
add_action( 'admin_footer', 'your_action_javascript' );