I have a SP.UI.ModalDialog. On the dialog there are two radio buttons:
- Agree
- Disagree
Then there is a submit button. The submit button checks to see what the value of the radio button is.
OnClick="if(document.getElementById('Agree').checked){var results ={result:'agree'};return SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK,results);}else{var results ={result:'disagree'};return SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel,results)}">
Now I want to add a "Close dialog" button, that simply closes the dialog. I don't want it to return any results. How can I simply close the dialog?
The following is not working for me:
OnClick="window.frameElement.SP.UI.ModalDialog.commonModalDialogClose();"