JSFiddle - React, Tailwind, and code Playground

by Dave Mednick

HTML

<div id="form_buttons_post" class="nxtline centered">
    <form id="mets_continue_form" action="mets.php" class="nxtline centered">
        <button id="mets_workit" />Work This Ticket</button>
        <input type="hidden" id="op" name="op" value="Update" />
        <input type="hidden" name="t_id" value="' + i + '" />
    </form>
    <form id="mets_another_form" action="mets.php" class="nxtline cenetered">
        <button id="mets_another" />Create Another Ticket</button>
        <input type="hidden" id="op" name="op" value="Create" />
        <input type="hidden" name="t_id" value="0" />
    </form></div>
    </div>

JavaScript

$(function() {
    $("#mets_workit").button().addClass("ui-state-default ui-corner-all").click(function(e) {
        $("#mets_continue_form").submit();
    });
});
$(function() {
    $("#mets_another").button().addClass("ui-state-default ui-corner-all").click(function(e) {
        $("#mets_another_form").submit();
    });
});