For some reason, my SharePoint's modal dialog doesn't work properly. The error I get is this:
SP.UI.$create_DialogOptions is not a function
Object doesn't support this property or method
Here is my code:
var options = SP.UI.$create_DialogOptions();
options.width = 525;
options.height = 300;
options.url = '/_layouts/mywork/richtexteditor.aspx';
options.dialogReturnValueCallback = Function.createDelegate(null, function (result, value)
{
alert(result + value);
});
SP.UI.ModalDialog.showModalDialog(options);
Interestingly, when I inspect the SP.UI in Firebug, I don't see all the methods and properties.
NOTE: I am using standard Webpart (not visual) and not an application page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With