I have a page with the following javascript on it:
var myVal = 'something';
Pub.Ribbon.PubRibbonComponent.launchDialog('_layouts/RteUploadDialog_Advanced.aspx',
SP.Publishing.Resources.media_UploadPreview,
null,
null,
Function.createDelegate(this,
function(dlgResult, returnValue) {
alert(myVal);
}));
This is basically opening a modal window that does some stuff, and then there is a callback function that alerts myVal. Is it possible for me to set myVal from javascript in the modal window that is opened by launchDialog? Alternatively, can I set the returnValue parameter of my callback function from javascript in the modal window?
So far I have tried the following:
window.opener.myVal = 'something new';
opener.myVal = 'something new';
myVal = 'something new';
but myVal is never available.