vendredi 13 mars 2015

Sharepoint 2013 - open a second modal window from a first modal window



I have an aspx page opened in a modal. On button click I need to close the current modal and open a new one or just open the new page in the same modal.


Any suggestions?


Below is my code:


function updateListItem(id,val) {



var clientContext = args['context'];
var oList = clientContext.get_web().get_lists().getByTitle('Weekly');

this.oListItem = oList.getItemById(id);

oListItem.set_item('SortOrder', val);

oListItem.update();
clientContext.executeQueryAsync(Function.createDelegate(this,this.succeed), Function.createDelegate(this,this.onQueryFailed));


}


function succeed() {



window.frameElement.cancelPopUp();
var options = SP.UI.$create_DialogOptions();
options.width = 500;
options.height = 250;
options.url = dialogResult;
SP.UI.ModalDialog.showModalDialog(options);
}


But it gives me this error: SCRIPT5011: Can't execute code from a freed script








1 commentaires:

  1. Hello,
    did you solved? I have the same problem,but I cannot find a way out...
    Emanuele

    RépondreSupprimer