Close modal ui page by clicking the cancel button

DreDay3000
Giga Guru

Hello, I have created a modal ui page that has a cancel button. When the cancel button is clicked I would like for the modal to close. 
button:
<button style="padding:5px;margin-right:10px" onclick="window.cancelAction(this.innerHTML,jQuery(\'#taskCancellation\').val())" class="btn btn-default">Cancel</button>

 

function:

  window.cancelAction = function(thisButton){
   if(thisButton){
         //Close the glide modal dialog window
         gm.destroy();
 window.close();
  }
  };

 

1 REPLY 1

Sujatha V M
Kilo Patron
Kilo Patron

@DreDay3000 Please refer the link for different modal UI actions activity and modify it accordingly for your modal. 

 

https://www.servicenow.com/community/developer-blog/quot-simple-modal-confirm-quot-ui-page/ba-p/2266...

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.