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

107
Views
Cómo ocultar un elemento en iframe que aparece tanto en el sitio principal como dentro del iframe

El botón de ayuda aparece en la página web, cuando hace clic en el botón de ayuda, se abre un iframe que es la misma página web en una ventana más pequeña (iframe).

¿Cómo oculto el botón de ayuda solo en el iframe para que no se pueda abrir otro iframe dentro del iframe?

He probado selectores de consultas y selectores DOM, pero no funcionan.

 xport default function help() { const [shown, setShown] = React.useState(false) // var myIframe = document.getElementById("iFrameContainer"); // var divElement = myIframe.contentWindow.document.querySelector(".helpButton"); // divElement.style.display = "none"; return ( <div className="helpButton"> {shown ? <Helper src="http://localhost:3000/"/> : null} <button onClick={() => setShown(!shown)}> <img src={helpIcon} alt=""/> </button> </div> ); } const Helper = (props) => { // var myIframe = document.getElementById("iFrameContainer"); // var divElement = myIframe.contentWindow.document.querySelector(".helpButton"); // divElement.style.display = "none"; return <div name="iFrameContainer"> <iframe className='frame' title={props.src} src={props.src} /> </div> }
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!