none
Opening page as modal dialog box RRS feed

  • Question

  • Hi,

    I am opening the upload document from an application page as dialog box. The page was opening as a dialog box. However, the page is opening as a normal page. I have not changed any code. This is the code below:

    [CODE]

    var options = SP.UI.$create_DialogOptions();
    options.url = "http://serverip/doclib/upload.aspx";
    options.title = "Upload Document";
    options.allowMaximize = false;
    options.showClose = true;
    options.width = 800;
    options.height = 800;
    SP.UI.ModalDialog.showModalDialog(options);

    [/CODE]

    The above code was working and i used to get the upload page as modal dialog, but now the page is opening as a page

    How to open a page as a Modal dialog box.

    Wednesday, October 5, 2011 6:20 AM

Answers

  • That should work in theory. Have you tried different browsers? Long shot but perhaps try initializing your options differently-

     var options = {
            url: 'http://serverip/doclib/upload.aspx?IsDlg=1',
            width: 800,
            height: 800};
        SP.UI.ModalDialog.showModalDialog(options);
    



    Pranav Sharma
    SharePoint Consultant, Portal Solutions
    • Marked as answer by Shimin Huang Friday, October 14, 2011 7:30 AM
    Wednesday, October 5, 2011 3:52 PM

All replies

  • I just ran your code and it is working fine on my machine.

    Maybe there are some changes with the http://serverip/doclib/upload.aspx page?

    Can you test with some other pages?

     

    Wednesday, October 5, 2011 7:07 AM
  • Hi,

    There are no changes. It was working fine, and i am getting now as a page

    Wednesday, October 5, 2011 9:17 AM
  • That should work in theory. Have you tried different browsers? Long shot but perhaps try initializing your options differently-

     var options = {
            url: 'http://serverip/doclib/upload.aspx?IsDlg=1',
            width: 800,
            height: 800};
        SP.UI.ModalDialog.showModalDialog(options);
    



    Pranav Sharma
    SharePoint Consultant, Portal Solutions
    • Marked as answer by Shimin Huang Friday, October 14, 2011 7:30 AM
    Wednesday, October 5, 2011 3:52 PM