JavaScript
function CustomActions() {
function Button_Callback(dialogResult, returnValue) {
if (returnValue == '0') {
//do something
}
else if (returnValue == '1') {
//do something
}
else if (returnValue == '2') {
//do something
}
else{
//do something
}
}
var options = {
url: 'Page Url',
title: 'Custom Actions',
allowMaximize: false,
showClose: true,
width: 610,
height: 500,
dialogReturnValueCallback: Button_Callback
};
var did = SP.UI.ModalDialog.showModalDialog(options);
}
function CustomActions() {
function Button_Callback(dialogResult, returnValue) {
if (returnValue == '0') {
//do something
}
else if (returnValue == '1') {
//do something
}
else if (returnValue == '2') {
//do something
}
else{
//do something
}
}
var options = {
url: 'Page Url',
title: 'Custom Actions',
allowMaximize: false,
showClose: true,
width: 610,
height: 500,
dialogReturnValueCallback: Button_Callback
};
var did = SP.UI.ModalDialog.showModalDialog(options);
}
Closing modal dialog.(C#)
HttpContext.Current.Response.Write("<script type='text/javascript'>window.frameElement.commitPopup('some value')</script>");
HttpContext.Current.Response.Write("<script type='text/javascript'>window.frameElement.commitPopup('some value')</script>");
No comments:
Post a Comment