Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Thanked 0 Times in 0 Posts

    showModalDialog with FF

    Hi guys,

    I'm using the following code for opening a Modal Dialog Box.

    PHP Code:
    function showdialog(url){
        if (
    window.showModalDialog) { 
    _R window.showModalDialog(urlself);
                 } else{

    MovePopup window.open(url'MovePopup'"modal=yes,menubar=no,scrollbars=no,status=no,titlebar=no,toolbar=no,height=125,width=300'");

    this works to open in both IE and Firefox. The problem is once the popup is open there is a form that when submitted sets back hidden variables that were in the 'parent' window. for IE i'm using 'window.dialogArguments' to set the variables back.

    My problem is this is not supported by FF. How do i do this with FF? I've tried different combinations of 'parent' and 'window' etc... and nothing seems to work.

    Thanks in advance!

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    Thanked 666 Times in 655 Posts
    You can't get that level of control of multiple windows using any browser other than IE since the modal dialog is only available in that browser. The only way to do it that is cross browser is to do everything in the one browser window by opening a new div in front and hiding the rest of the page behind a semi-transparent image.
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts