Hi,
Is there a way to reset an IFrame from with in other frame in PHP or should I use HTML for that?
Can somebody help me with the PHP or HTML code?
Thanks in advance,
Jack
Hi,
Is there a way to reset an IFrame from with in other frame in PHP or should I use HTML for that?
Can somebody help me with the PHP or HTML code?
Thanks in advance,
Jack
Use JavaScript...say your frame is called "iframefun"
The code
<html>
<head><title>This is funky.</title>
<script language="JavaScript">
<!--
function reloadFrame() {
parent.iframefun.reload();
}
//-->
</script>
<body>
<p>Hello. This is funky.</p>
<p><iframe src="blahblahblahblah.html" name="iframefun" height="500" width="500" /></p>
<p>You can modify the height and width to suit your needs.</p>
<p>Click on the link below to reload the IFrame. </p>
<p><a href="#" onclick="reloadFrame()">Click me</a></p>
</body>
</html>
Hope this helps.
Hi Merve,
Nope, does not work.
I have a index.php page that contains 3 IFrames (category, section and _link)
I display in the first Iframe the name of categories. If you click on a categorie link I show the sections that belong to that category in the 2nd Iframe. If you click on a section I show all the links that belong to that section in the 3rd Iframe.
If the users click on a new category the _link frame needs to be cleared.
I placed the Javascript in both index.php and the page that goes into the first Iframe. I gave the link the onclick event but the _link frame does not clear.
The JavaScript should be:
parent._link.document.reload();
I think....Merve is usually wrong but is always happy to help...we'll work this one out together!