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

245
Vistas
how to solve windows.close don't work with street view

I'm trying to open a street view floating window with "window.open" and then close with "close()". I try with google.com, and it works (the window close). But, with the street view window, doesn't work (don't close). If I open and close immediately it works. I think it's because of redirection. ¿Any ideas to solve?

I have tried it on https://www.w3schools.com/html/tryit.asp?filename=tryhtml_default_default

<!DOCTYPE html>
<html>
<body>

<h1>Google</h1>

<button onclick="openGoogle()">Open "google"</button>
<button onclick="closeGoogle()">Close "google"</button>
<br>
<h1>StreetView</h1>
<button onclick="openStreetView()">Open "streetview"</button>
<button onclick="closeStreetView()">Close "streetview"</button>

<script>
let google;
let streetview;

function openGoogle() {
  google = window.open("https://www.google.com/", "Google", "width=800,height=800");
}

function closeGoogle() {
  google.close();
}


function openStreetView() {
  streetview = window.open("https://www.google.com/maps/@43.3396007,-1.8096601,3a,75y,90t/data=!3m6!1e1!3m4!1sZ81gym2y_KL-MPWdBQ1Mqg!2e0!7i16384!8i8192", "Google", "width=800,height=800");
}

function closeStreetView() {
  streetview.close();
}

</script>

</body>
</html>
about 4 years ago · Santiago Trujillo
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