Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8960
  • Last Modified:

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

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...

  • 4
2 Solutions
showModalDialog functionality can be acheived by window.open method

<SCRIPT TYPE="text/javascript">

You can specify the width and height...

Check this site for code...http://www.subimage.com/dhtml/subModal/
<SCRIPT TYPE="text/javascript">

this code perfectly work for mozilla firefox
Check this site for code which shows successful implementation of the MODAL DIALOG for FIREFOX.....http://www.subimage.com/dhtml/subModal/
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() {
var params = 'a|b|c';
window.open('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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now