2

My custom dialog page uses dialog.master as master page. It shows a Cancel button at the bottom right of the dialog box, which closes the dialog instantly.

Since I implemented my own cancel button which does some stuff in the OnClick event, I do not need the default one. How can I get rid of it?

Thanks!

2

There is a property in Dialog options

showClose boolean (true/false) Determines the visibility of the close button (at top right corner) for the modal dialog

To use it:

var options = { 
url: '/SitePages/Page.aspx', 
title: 'Page Title', 
allowMaximize: false, 
showClose: false, 
width: 800, 
height: 600, 
dialogReturnValueCallback: CloseCallback }; 
SP.UI.ModalDialog.showModalDialog(options);

Reference:

SP.UI.ModalDialog.showModalDialog(options) Method

  • The "Close" Button is not the "Cancel" button I'm talking of – elsni Mar 12 '14 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.