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!
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.