locked
Modal Dialog does not open in Internet Exploere 11 RRS feed

  • Question

  • I wrote a Javascript function on a SharePoint page  that on an image click to open another page in Modal Dialog. The function works fine if I am using the edge browser. However, it renders a weird error on screen if my browser is ie 11. Do you know if I should run a patch for the ie 11 to get the Modal dialog work in this browser.

    faye fouladi

    Thursday, November 28, 2019 3:33 AM

All replies

  • Hi SharePointTeck,

    May I know more info about how you open modal dialogue? And the SP version you're using is SharePoint 2013, right? 
    It would be great if I can reproduce the issue.

    Thanks

    Baker Kong


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click  here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, November 28, 2019 6:15 AM
  • Yes the SharePoint version is 2013.

    Below is the code:

    when the user clicks on an area on the image (on the parent page)

    <area target="_blank" alt="Joe Doe" title="Joe Doe" href='javascript:displayUserProfile("JDoe@Mycompany.com")' coords="400,411,270,351" shape="rect">

    The javaScript that opens the Modal Dialog is below:

    function displayUserProfile(UserEmail) {
     //  alert('icon clicked!');
                     
        var siteurl = _spPageContextInfo.webAbsoluteUrl;
       
      // alert(siteurl);
                     
        var pageUrl =  "/SitePages/DynamicPopUp.aspx?UserEmail=" + UserEmail;
        var itemurl = siteurl.concat(pageUrl);
      // alert(itemurl);
     
       var options = SP.UI.$create_DialogOptions();
     
     options.url = itemurl;
     options.width = 400;
     options.height = 400;
     
     options.dialogReturnValueCallback = Function.createDelegate(
     
     null, CloseCallback);
     
     SP.UI.ModalDialog.showModalDialog(options);
     
     }

    On the Modal Dialog page, I have the following:
    <script src="//code.jquery.com/jquery-3.1.0.min.js" type="text/javascript"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices-2014.02.js" type="text/javascript"></script>
    <script type="text/javascript">
    $( document ).ready(function() {
       
        alert('We are inside Modal Dialog');
     
      var EmployeeEmail = getUrlParameter('UserEmail');
     
      alert(UserEmail);
     
     
    });

    Please see if you can reproduce the error.

    Thanks for helping.


    faye fouladi


    • Edited by SharePointTeck Thursday, November 28, 2019 6:58 AM giving more info
    Thursday, November 28, 2019 6:55 AM
  • Hi SharePointTeck,

    Here I tested it with the following demo in SharePoint 2013, however it could open the dialog normally even in IE 11.

    <html>
    <head>
        <title>Page Title</title>
        <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
    
        <script type="text/javascript">
            $(document).ready(function () {
                $("#savebtn").click(function () {
                    var options = SP.UI.$create_DialogOptions();
    
                    options.url = _spPageContextInfo.webAbsoluteUrl + "/SitePages/xxx.aspx";
                    options.width = 600;
                    options.height = 400;
                    options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
    
                    SP.UI.ModalDialog.showModalDialog(options);
                });
    
            });
    
            function CloseCallback(result, target) {   
                    alert('ok');
            }
        </script>
    </head>
    <body>
        <h1>This is a Button</h1>
        <input id="savebtn" type="button" value="Save" name="btnSave" />
    </body>
    </html>

    Can you share more info about the error ?

    Best Regards,

    Baker Kong


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click  here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.


    Thursday, November 28, 2019 8:01 AM
  • Thanks for testing it. The error I get is:

    Make Sure the web address//ieframe.dll/dnserror.htm?ErrorStatus=0x80004004#

    I believe this error has to do with the Internet Explorer itself.

    Do you have any experience with this?


    faye fouladi

    Friday, November 29, 2019 1:35 PM
  • Hi SharePointTeck,

    It seems that this is caused by IE itself. Hence we would suggest you reset IE to give a shot:

    Best Regards,

    Baker Kong


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click  here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, December 2, 2019 6:43 AM
  • Thanks, I will do that.


    faye fouladi

    Monday, December 2, 2019 9:42 AM
  • Hi SharePointTeck,

    Regarding this issue, may i know how's going? does it get resolved? please feel free to talk with us if there is anything else we can help further.

    Thanks 

    Baker Kong


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click  here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, December 5, 2019 7:37 AM
  • this issue has been resolved by reinstalling IE 11 and applying the patch.

    faye fouladi

    Monday, December 9, 2019 7:27 PM
  • Hi SharePointTeck,

    That's pretty good. I am glad to hear this good news. if possible, could you please mark it as ANSWER so that others who stuck in similar issues will get answered quickly. 

    Thanks 

    Baker Kong


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click  here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, December 10, 2019 7:35 AM