Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

566
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda