Is "showModalDialog()" supported by firefox and other browsers?

Does anyone know if the showModalDialog() javascript function works with firefox or other non-IE browsers?

I have this code:

  args=new Array();
  args["FieldName"] = field_name;
  args["FileURL"] = url;
  args["FileType"] = type;

newURL = showModalDialog( "includes/filebrowser/insimage.php", args, "font-family:Verdana; font-size:12; dialogWidth:475px; dialogHeight:450px; help:no; status:no;");

But it is not working in firefox. The JavaScript Console on Firefox reports that showModalDialog is not defined.

Any ideas? Is this not possible? A modification is needed to my javascript code?

Thanks for any help.

No, it is not supported. It’s an IE only feature. Check out this link for more information:

Thanks very much! Do you know what would be the equivalent “cross-browser” javascript code for what I’m trying to do now with the showModalDialog() function? Can I still pass the “arg” array parameter if I use some other cross-browser method?

Thanks again!

The closest thing I could find was this:

look at the comments at the end.

Mozilla based browsers support adding modal=yes to the third argument in a and that will keep the opened window in front of the one that opened it (but doesn’t really force it to be modal). There is nothing that will get other browsers to even do this much.

The solution is to open an overlay in the same window that stops the rest of the page being accessed until it is closed.


give some feedback !



Here is a cross browser showModalDialog on my blog.
It works on all major browser.
window.showModalDialog() - Cross Browser, new version | Development Solutions