Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <button id="btn-reject" class="btn btn-danger" type="submit" style="float: right;">Reject Request</button>
- <div id='reject-dialog' title='Confirmation Required'>Reject Request?</div>
- <script type="text/javascript">
- $(document).ready(function () {
- $("#reject-dialog").dialog({
- autoOpen: false,
- modal: true,
- buttons: {
- "Confirm": {
- text: "OK",
- id: "confirm-reject"
- },
- "Cancel": {
- text: "Cancel",
- id: "cancel-reject"
- }
- }
- });
- $("#btn-reject").click(function (e) {
- e.preventDefault();
- $("#reject-dialog").dialog('open');
- });
- $('#cancel-reject').click(function () {
- $("#reject-dialog").dialog('close');
- console.log('confirm');
- });
- $('#confirm-reject').click(function () {
- $("#reject-dialog").dialog('close');
- console.log('reject');
- });
- }); //dom
- </script>
- <script type="text/javascript">
- $(document).ready(function () {
- var dialogDiv = $("#reject-dialog");
- dialogDiv.dialog({
- autoOpen: false,
- modal: true,
- buttons: [
- {
- text: "OK",
- id: "confirm-reject",
- click: function() {
- dialogDiv.dialog("close");
- console.log('confirm');
- }
- },
- {
- text: "Cancel",
- id: "cancel-reject",
- click: function(){
- dialogDiv.dialog("close");
- console.log('reject');
- }
- }
- ]
- });
- $("#btn-reject").click(function (e) {
- e.preventDefault();
- dialogDiv.dialog('open');
- });
- }); //dom
- </script>
- $('#cancel-reject').click(function () {
- $("#reject-dialog").dialog('close');
- console.log('confirm');
- });
- $(document).on('click','#cancel-reject', function () {
- $("#reject-dialog").dialog('close');
- console.log('confirm');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement