|
From: Jacob on 15 Mar 2006 07:47 How do I refresh an iframe via JavaScript from the parent page? /Jacob
From: marss on 15 Mar 2006 08:29 Jacob wrote: > How do I refresh an iframe via JavaScript from the parent page? > > /Jacob <html> <head> <script type="text/javascript"> function Reload () { var f = document.getElementById('iframe1'); f.src = f.src; } </script> </head> <body> <iframe id="iframe1" height="200" width="300" src="http://google.com"></iframe> <br> <input type="button" value="Reload" onclick="Reload();"> </body> </html>
From: Jacob on 15 Mar 2006 09:22 Is there no way to use location.refresh or location.reload? /Jacob
From: marss on 15 Mar 2006 09:47 Jacob wrote: > Is there no way to use location.refresh or location.reload? > > /Jacob var f = document.getElementById('iframe1'); f.contentWindow.location.reload(true); Value of parameter in the brackets : false - Default. Reloads the page from the browser cache. true - Reloads the page from the server. But I don't know whether it works elsewere besides IE.
From: Thomas 'PointedEars' Lahn on 15 Mar 2006 22:56
Jacob wrote: > How do I refresh an iframe via JavaScript from the parent page? window.frames[...].reload(...); Might not be pretty, is completely proprietary, but it works always. Even with different second-level domains. PointedEars |