JSFiddle - React, Tailwind, and code Playground
HTML
<div class="acknowledge">
<form method="post" name="blitzread" action="blitzread.php" id="submit">
<input type="hidden" name="emp_id" value="123" />
<input type="hidden" name="current_time" value="123" />
<button type="submit" name="Submit" class="btn btn-large btn-danger">Acknowledged</button>
</form>
</div>
JavaScript
$('#submit').submit(function(e) {
e.preventDefault();
e.stopPropagation();
$.ajax({
data: $(this).serialize(),
type: $(this).attr('method'),
url: $(this).attr('action'),
success: function(response) {
$('.acknowledge').html('<button class="btn btn-large btn-success disabled">Acknowledge</button>');
}
});
return false;
});