JSFiddle - React, Tailwind, and code Playground
HTML
<script>
function btn_SaveCriteria_onclick() {
//Testing if function fires:
alert(5 + 6);
var availableSelects = [];
$("Select").each(function () {
availableSelects.push($(this).attr("id"));
});
if ($("#" + availableSelects[1]).find(":selected").text() + $("#" + availableSelects[2]).find(":selected").text()+$("#" + availableSelects[2]).find(":selected").text() ==='AllAllAll') {
$(".PageTitle").append("<div id='dialog' title='Parameter Warning'>You cannot select all for all 3 filters</div>");
$("#dialog").dialog();
} else {
var t = document.getElementById("modal-form").cloneNode(true);
t.style.display = "inline";
var options = { title: "Add a Description to your Subscription", width: 500, height: 100, dialogReturnValueCallback: MyDialogClosed, html: t };//$('<div id="pgDiv"><form id="pgForm" method="post"><input type="text" name="Description" id="pgDescription>Description: </form></div>').get(0) };
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
}
</script>
<input class="btnSaveParameters" id="btn_SaveCriteria"
onclick="btn_SaveCriteria_onclick();" type="button" value="Save Subscription"/>