Created
August 12, 2016 19:23
-
-
Save kemiller2002/84f6e6746fa9327f0216c87f379ae472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script> | |
<input type="button" class="btnSaveParameters" id="btn_SaveCriteria" | |
onclick="return btn_SaveCriteria_onclick()" | |
value="Save Subscription" /> | |
<script > | |
function btn_SaveCriteria_onclick() { | |
//Testing if function fires: | |
window.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> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm a complete newbie, but doesn't it need at the top?