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

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

Regards,
fall
0
A91627
Asked:
A91627
  • 4
2 Solutions
 
bugs021997Commented:
showModalDialog functionality can be acheived by window.open method

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

You can specify the width and height...


Check this site for code...http://www.subimage.com/dhtml/subModal/
0
 
bugs021997Commented:
<SCRIPT TYPE="text/javascript">
window.open('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');
</script>

this code perfectly work for mozilla firefox 2.0.0.3
0
 
bugs021997Commented:
Check this site for code which shows successful implementation of the MODAL DIALOG for FIREFOX.....http://www.subimage.com/dhtml/subModal/
0
 
bugs021997Commented:
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...

<html>
<head>
<style>
</style>
<script>
function Open_Window() {
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
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');
}
</script>
</head>
<body>
<input type="button" value="Test Window" onclick="Open_Window()">
</body>
</html>
0

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