Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

352
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda