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

102
Views
Do action in iFRame when people click in a specific part

I have an iframe with 3 buttons inside, and I want remove this button when people click in a specific part of iframe, not when click in the buttons but when click in a specific part on iframe. When people click in that part, the 3 buttons have to disappear.

This is the code:

<div class="frame-container">
<button class="iframe-button">
<img src="pic_trulli.jpg" alt="Clicca nello spazio verde per andare avanti->">
</button>
<button class="iframe-button2">
<img src="pic_trulli.jpg" alt="I trucchi sono aggiornati e disponibili GRATIS!">
</button>
<button class="iframe-button3">
<img src="pic_trulli.jpg" alt="Registrati adesso per riceverli via EMAIL!">
</button>
<div style="overflow: hidden; margin: -120px auto; max-width:;"><br>
<iframe scrolling="no" width="370" height="363" frameborder="0" target="_self" src="test.com" />
</iframe>
</div>
</div>

.iframe-button {
  position: absolute;
  top: 180px;
  left: 32px;
  background-color: #3366cc;
  border: none;
  color: white;
  padding: 21px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 11px;
}
.iframe-button2 {
  position: absolute;
  top: 88px;
  left: 30px;
  background-color: #d9d9d9;
  border: none;
  color: #000000;
  padding: 9px 1px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 15px;
}
.iframe-button3 {
  position: absolute;
  top: 129px;
  left: 35px;
  background-color: #d9d9d9;
  border: none;
  color: #000000;
  padding: 11px 12.5px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 15px;
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

@HannaRose's question is a crucial one.

There are 2 scenarios:

  1. Your iframe is pointing to a site that you have control over
  2. Your iframe is pointing to an external site.

Scenario 1: If your iframe is pointing to your own website, then using an iframe may not be the best solution. An iframe is akin to a one-way window - it does not return any data or events when you interact with the website behind the iframe. It would be better to create 3 buttons on your page to perform the same actions as those of the buttons inside the iframe.

Alternatively, on the page your iframe pointing to - you could hide the buttons when clicked on THAT page.

Scenario 2: If your iframe is pointing to an external website You wont be able to hide the buttons at all. If you could, you would be changing behaviour of another website entirely. The best you can do is hide the entire iframe when clicked

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!