Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

564
Views
showModalDialog and window.open does not work in Microsoft Edge

The project that i am trying to fix was based on IE. At one of the pages users will get city name and city code from an opened pop-up page. Those values will pass from pop-up page to current page. There is no problem by doing this while using IE. However if they want to use Microsoft-Edge, that city name and city code will not pass. When I debug the related javascript code in both Microsoft-Edge and IE, I have noticed some problems.

if (window.showModalDialog) {
        returnValue = window.showModalDialog(adress, window, "dialogWidth:700px; dialogHeight:500px; status:no; center:yes; resizable:yes; scroll;yes");
    }
    else {
        returnValue = window.open(adress, "newWindow", "width=700, height=500, top=150, left=150, status=no, resizable=yes, scroll=yes, toolbar=no, scrollbars=yes, menubar=no, location=no");
    }

    if (returnValue == null) returnValue = "";
    
    if (returnValue != "") {
        var split2 = returnValue.split("£");
        window.document.getElementById(knt + "txtKod").value = split2[0];
        
        
    /*
    ...................................
    */
    }

In this piece of code; IE fires returnValue under if (window.showModalDialog) and a pop-up page is opened. It allows users to select city code and city name and passes those values to current page with this returnValue. However, in Microsoft-Edge, that returnValue returns undefined and it fires the returnValue = window.open in else section. But in this time it does not wait users to select city name and city code and it passes to if (returnValue == null) returnValue = ""; section. So, returnValue eventually does not return an expected value. What I wonder is, are there any alternative for window.showModalDialog and window.open or do I need to add something.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!