Reputation: 29
When a user clicks on my button there appears a SharePoint modal dialog. The popup shows the user a confirmation message. This is already working.
Now I want the following: When the users clicks on the YES button, the first popup closes and and a new modal dialog opens.
Is this possible? And how? Or can i resize the dialog dynamicly when he's already open?
here are my methods to open the dialogs:
function OpenPopup() {
var options = SP.UI.$create_DialogOptions();
options.url = "popup.aspx";
options.width = 230;
options.height = 235;
options.title = "";
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallbackNew);
SP.UI.ModalDialog.showModalDialog(options);
}
function OpenSecondPopup() {
var options = SP.UI.$create_DialogOptions();
options.url = "popup2.aspx";
options.width = 630;
options.height = 235;
options.title = "";
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallbackNew);
SP.UI.ModalDialog.showModalDialog(options);
}
Upvotes: 2
Views: 1363
Reputation: 50154
Is it not as simple as
CloseCallbackNew
called CloseCallbackNewSecond
OpenSecondPopup
to reference this new copy instead of the originalOpenSecondPopup
at the end of CloseCallbackNew
, referencing the dialog result so as to only call it if the user clicked YESIt seems like this should call the second popup when the first is closed.
Upvotes: 0