Closed Bug 318874 Opened 19 years ago Closed 19 years ago

showModalDialog( ) is not working in Firefox 1.0.7

Categories

(Firefox :: General, defect)

1.0 Branch
x86
Windows 2000
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 194404

People

(Reporter: kvramalingeswararao, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: Firefox 1.0.7

To overcome this problem, I modified the code as below :

<script>
 function fun()
 {
          var hh, h;
          //  alert(window.showModalDialog);
          if (typeof(window.showModalDialog)=="undefined")
          {
                   h = window.open("hellos.html", hh, "left=100,top=100,width=550,height=300,dependent,modal");
                   window.onfocus=function()
                   {
                             if(h && !h.closed)
                                      h.focus();
                   }
          }
          else 
          {
                   h = window.showModalDialog("hellos.html", hh);
          }
 }
</script>


Reproducible: Always
Could you please try this code with Firefox 1.5? Firefox 1.0.7 (part of Gecko 1.7) is now only for security changes.

Firefox 1.5 can be obtained at http://www.mozilla.com/firefox/ and is the latest release of Mozilla Firefox.
Component: Software Update → General
QA Contact: software.update → general
Hardware: All → PC
Version: unspecified → 1.0 Branch
Ah, check bug 194404. It seems this hasn't been implemented in Firefox yet.

*** This bug has been marked as a duplicate of 194404 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
window.showModalDialog was not implemented in Firefox 1.5 also.
The above specified example is not suggestable in all cases.
ie, the problem with the specified code is that window.open is asynchronous.
It does not block the JavaScript execution until the window has finished loading. 
Could you please have a look on this code :-

<script>
function fun()
{
    var hh, h=null;
    
    if (window.showModalDialog)
    {
       h = window.showModalDialog("hellos.html", hh);
    }
    else
    {
		h = window.open("hellos.html", hh, "left=100,top=100,width=550,height=300,dependent,modal");

	   window.onfocus=function()
           {
			if(h && !h.closed)
			{
				h.focus();
			}
           }
	   return false;
    }
	
    alert("hai");

}
</script>


How can I get alert message in Firefox?
Any how, it's critical
Severity: normal → critical
You need to log in before you can comment on or make changes to this bug.