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

165
Views
How do I open a new window and show an alert in it?

I have created two html files (missions.html and missionInfo.html). In missions.html , I have called a function "open" which is defined in a java script file and is as follows:

function open()   
{   
    alert("Hello");   
    window.open("missionInfo.html" , "_self");   
    alert("Hello Again");   
} 

I want to show an alert box saying "Hello" in missions.html then open missionInfo.html and in this newly opened file I want to show an alert box saying "Hello Again" . But when I'm calling this function in mission.html it isn't executing completely . It shows first alert box then opens the missionInfo.html file and then stops executing . It is not showing the second alert box which was supposed to be shown in missionInfo.html

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

this is a fairly simple task anyway.

At first, you have one page say, index.html in which when you defined open function in it to open a new document missionInfo.html.

All you have to do is just add code to show an alert on the missionInfo.html page.

So now your missionInfo.html should look like this:

<!DOCTYPE html>
<html lang="en">
<head>
    ...
    <title>Test</title>
</head>
<body>
    ... 
    <script>
        alert('Hello from Mission Info')
    </script>
</body>
</html>

That's it!

about 4 years ago · Juan Pablo Isaza Report
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!