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

350
Views
Can you reload an iframe using PHP when an IF condition is met?

So I have two pages, my PHP script and then an HTML page with two iframes in it.

> <html>
> 
> <iframe name=1></iframe> <iframe name=2></iframe>
> 
> </html>

Iframe2 is currently housing my PHP script. My PHP script is something like below:

<?php

if this {
do this
}

?>

What I am trying to find out is if it's possible for my IF condition within my PHP script can reload iFrame1? I've played around with different methods and onClick obviously works to reload the frame, but I need the frame to reload based on the IF condition being met and I can't really figure that out. TIA!

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

0

PHP is not able to change/reload a frame on client browser. PHP is a server-site language. You have to use javascript here like you found out: "onClick" (javascript) works.

If you like to, you can use javascript combined with ajax to ask "PHP" on the server if javascript should reload the frame.

But PHP can NOT reload anything on the browser after document is loaded.

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!