-1

I am working on some browser neutral issue and I see code is in window.open() for new window, it works in IE-11(but not modal pop-up) and not in any other browsers such as Edge, Safari, Chrome.

the currently the window.open() is not of Modal type so is there any way I can change this window to modal and could work in all above mentioned browsers in a easy way ?

here is the code

function ShowAbbreviationDefinition_onclick()
    {
        var windowOptions = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,height=400,width=400,left=300,top=150"
        window.open("../UserControls/Somepage.aspx", "", windowOptions);
    }

Thanks.

Manjuboyz
  • 6,978
  • 3
  • 21
  • 43

2 Answers2

0

You can try using jQuery UI dialog. For that you need to add jQuery UI css and js files to your page.

<div id="dialog" style="display:none;"></div>

function ShowAbbreviationDefinition_onclick(url){
    $("#dialog").append($("<iframe />").attr("src", "UserControls/Somepage.aspx")).dialog();
}
Bharatsing Parmar
  • 2,435
  • 1
  • 9
  • 18
  • jQuery doesn't have a dialog, jQueryUI does but also requires including source files which isn't mentioned here – charlietfl Jan 04 '17 at 06:16
0

If you want a native ASP.NET component, you can refer to MSDN blog posts.

Otherwise, jQueryUI provides an entire framework with a completely client-based modal called Dialog.

You'll want to understand that an iframe will need to contain the Somepage.aspx URI. See this other answer.

Community
  • 1
  • 1
Jeff Meatball Yang
  • 37,839
  • 27
  • 91
  • 125