Below is the code for open my page that processes some data on my SharePoint list item.
function displayApprovalModaldig(responseID)
{
// alert('display Approval is called.');
// alert(responseID);
listitemUrl = _spPageContextInfo.webAbsoluteUrl + "/SitePages/Approval.aspx?audit=" + Audit + "&response=" + responseID;
// alert(Audit);
// alert(listitemUrl);
var options = {
url: listitemUrl,
title: "Approval Process",
allowMaximize: true,
showClose: true,
height: 1500,
dialogReturnValueCallback: Function.createDelegate(null, popupAuditClose)
};
SP.UI.ModalDialog.showModalDialog(options);
}
I have a button on my page like below:
<button id="btnClose" onClick="MyWindowClose()" type="button">Close</button>
function MyWindowClose()
{
alert('Close is clicked.');
window.close();
}
I have tried different methods to close the Modal dialog by clicking the button but nothing seems to work.How can I trigger the click of the X on the top right hand side of my page?
faye fouladi