Help me please....
myFile.js
Above code is working fine on F5 in IE to refresh the IFrame with it's Container Page but failed for FireFoxCode:window.onbeforeunload=init;
function init()
{ parent.location.reload(); }
Printable View
Help me please....
myFile.js
Above code is working fine on F5 in IE to refresh the IFrame with it's Container Page but failed for FireFoxCode:window.onbeforeunload=init;
function init()
{ parent.location.reload(); }
If this is a popup, use opener instead of parent.
EDIT:
Are you trying to refresh the parent of an iframe or refresh the iframe itself?Quote:
Originally Posted by AbrarNazeer
PeejAvery! Thanks for ur time ...
1) this is NOT a popup
2) I'm trying to refresh the parent of an iframe NOT iframe itself.
Background - Banner Images Pairs :
Actually , Iframe displays the Banner Image while Iframe Container Page display the Background Image. on F5 , this pair of images refresh perfectly in IE while in FireFox , Background Image become cached and IFrame refreshed , so the Pair of images become unmatched.
Are you sure it is a cache issue? If so, you can use <meta> tags to override the cache.
Code:<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="Sat, 1 Jan 2000 00:00:00 GMT">
PeejAvery!
"<meta> tags" did not solve my problem. Means that "this is not a cache issue". But I'm stuck here to solve the issue on FireFox.
Well, the onbeforeunload event doesn't work in Firefox or Safari. At least not in my testing. The following worked perfectly fine though.
Code:function init() {
parent.location.reload();
}
window.onunload = init;
PeejAvery!
did not work fine on FireFox(2.0.0.12).Code:function init() {
parent.location.reload();
}
window.onunload = init;
Well then there is something else you are doing that is blocking it. The attachment works perfectly.
PeejAvery! The code u ve sent is working fine (Thanks) . but fruitless for me.
Here is the short description of my requirement and issue...
JS file -----------------> Web Page #01
|
-----------------> Web Page #02
JS file displays the Banner and Background combination by the help of these 2 web pages. Code details are
1) Web Page #01 displays Banner in iframe,iframe attributes are set by JS File
var url = 'http://www.myWebSerer.com/WebPage01.aspx'
var oIfrm=document.createElement("IFRAME");
oIfrm.setAttribute('id','iframe1');
oIfrm.setAttribute('src',url);
2) Web Page #02 sets the background
document.body.background = 'http://www.myWebSerer.com/WebPage02.aspx';
the concerned thread's URL is
"http://forums.mozillazine.org/viewtopic.php?t=630475&highlight="
please visit for me.
I'm not going to join another forum for every person who comes on here and asks for help in multiple forums. That is a complete waste of my time.
If you are going to change the style of the background through CSS, you must use valid CSS.
Code:document.body.background = 'url(http://www.myWebSerer.com/WebPage02.aspx)';