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

101
Views
Javascript function that checks if a page is contained inside an iframe

I have two pages sem_menu.html and sem_menu2.html with the same headers, when sem_menu2 is contained and inserted in an iframe I hide the header of it so only the header of the sem_menu is displayed.

What I want to do is create a function that if sem_menu2 is contained in an iframe having the hidden header must write me in the sem_menu header while if it is not contained in an iframe then it is opened as a normal page it must write in its own header then of sem_menu 2.

if (window.parent.frames.length > 0) {
        alert(sessionStorage.sem_applicazione);
    } else {
        alert('no!')
    }

For now I have only this, can someone help me?

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!