Modal Dialog window in firefox? Not compatible with window.showModalDialog

Posted on 2007-08-06
Last Modified: 2013-12-07
Hi all experts,

I having a problem with modal dialog windows in firefox. Currently i use showModalDialog in javascript and it work fine in IE. But when it come to firefox, it become useless.

Could any 1 give me advise how to write the script to show modal dialog in firefox?
I had read some documentation in mozilla, and i know there is a method that firefox support to open modal dialog form which is window.openDialog. However, when i use this method in my javascript with firefox, it seem not work. and seem like something to do with UniversalBrowserWrite Privilege.

May I know what is the UniversalBrowserWrite Privilege?
Is there any other method to use for open modal dialog in firefox? or any other substitution way to do this?

I need it to popup as a modal dialog window and return some result back to the parent window to process.

I'm using Windows XP Professional SP2, IIS5.1, ASP.NET, .NET Framework 2.0, IE and firefox for environment testing.

Thanks for everything...

Question by:A91627
    LVL 14

    Expert Comment

    showModalDialog functionality can be acheived by method

    <SCRIPT TYPE="text/javascript">'bugs.html','','modal=yes');

    You can specify the width and height...

    Check this site for code...
    LVL 14

    Expert Comment

    <SCRIPT TYPE="text/javascript">'bugs.html','','chrome,centerscreen,dependent=YES,dialog=no,resizable=NO,scrollbars=NO,location=0,status=0,menubar=0,toolbar=0,width=200px,height=200px,modal=yes');

    this code perfectly work for mozilla firefox
    LVL 14

    Accepted Solution

    Check this site for code which shows successful implementation of the MODAL DIALOG for FIREFOX.....
    LVL 14

    Assisted Solution

    The below code would work fine in FIREFOX, you need to call alternative for IE.... in open_window check which browser it is and run accordingly...

    function Open_Window() {'UniversalBrowserWrite');
    var params = 'a|b|c';'bugs.html?params='+ params +'', 'test', 'chrome,centerscreen,dependent=YES, dialog=YES,modal=YES,resizable=NO,scrollbars=NO, location=0,status=0,menubar=0,toolbar=0');
    <input type="button" value="Test Window" onclick="Open_Window()">

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
    How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now