I have problems with multiple modal dialogs using IE 9 browser. When I click on the Ok or Cancel button on the second modal form, I get following exception from my js code.
when I try once again to press Ok or Cancel button I get
It works fine on Chrome and Firefox.
on my first dialog I have a link button and this fires a standard js function
function AddContributor(id) {
var currentUrl = window.location.href;
currentUrl = currentUrl.substring(0, currentUrl.lastIndexOf('/') + 1);
var options = SP.UI.$create_DialogOptions();
options.url = currentUrl + "/SecondPage.aspx?id=" + id;
options.title = "Add";
options.width = 700;
options.height = 600;
options.dialogReturnValueCallback = AddContributorCallback;
SP.UI.ModalDialog.showModalDialog(options);
}
function AddContributorCallback(dialogResult, returnValue) {
if (dialogResult == SP.UI.DialogResult.OK) {
SP.UI.Notify.addNotification('xxx');
SP.UI.ModalDialog.RefreshPage(dialogResult);
}
if (dialogResult == SP.UI.DialogResult.cancel) {
SP.UI.Notify.addNotification('xxx.');
}
}