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

255
Views
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
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!