0

I created modalDialogPopup confirmation box with sharpoint object model. I want to display list item name instead of please confirm(title). See following code:

var options = {
    html: cloneModalContent, // ID of the HTML tag or HTML content to be displayed in modal dialog
    width: 375,
    height: 150,
    title: "Please Confirm",
    dialogReturnValueCallback: CloseDialog, // custom callback function
    allowMaximize: false,
    showClose: true
   };

 SP.UI.ModalDialog.showModalDialog(options);

Thank you.

1

Having the item just before show the modal dialog you need only to set the title in this way

var options = {
    ...,
    title: item.Title,
    ...
};

[UPDATE 1]

Try with this if doesn't work

//Using the DialogOptions class.
var options = SP.UI.$create_DialogOptions();

options.title = "My Dialog Title";
options.width = 400;
options.height = 600;
options.url = "/_layouts/DialogPage.aspx";

SP.UI.ModalDialog.showModalDialog(options);
4

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.