I have a page that opens a dialog for a NewForm.aspx for a list. The code:
<script>
function openDialog(pageUrl) {
var options = {
url: pageUrl,
title: 'Add Skills',
allowMaximize: false,
showClose: true,
width: 500,
height: 500
//dialogReturnValueCallback: RefreshOnDialogClose //when I try to use this line dialog won't open.
};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
</script>
<a href="#" onclick="openDialog('http://london/lists/childribbon/newform.aspx');">Add New Item</a>
The script without the dialogReturnValueCallback works fine and it shows the dialog, but when I try to add dialogReturnValueCallback nothing happens.
thanks
