HighDots Forums  

iframe to parent to iframe

Javascript JavaScript language (comp.lang.javascript)


Discuss iframe to parent to iframe in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lee
 
Posts: n/a

Default iframe to parent to iframe - 08-04-2006 , 12:21 AM






Hi, I have a page with a few iframes.

How would I write a function to refresh another iframe from one iframe?
Something like this?

function refreshOtherIframe(){
parent.document.getElementById('otherIframe').refr esh();
}


Reply With Quote
  #2  
Old   
Cylix
 
Posts: n/a

Default Re: iframe to parent to iframe - 08-04-2006 , 05:10 AM






Quote:
function refreshOtherIframe(){
parent.document.getElementById('otherIframe').refr esh();
}
For me, I will
if (parent.frames['otherframe']) parent.frames['otherframe'].refresh();



Reply With Quote
  #3  
Old   
Lee
 
Posts: n/a

Default Re: iframe to parent to iframe - 08-06-2006 , 09:14 PM



I got this error after running this code. Any help? Thanks.

Error: parent.frames.browse_iframe.refresh is not a function

<script language="javascript">
<!--
if (parent.frames['browse_iframe']){
if(parent.frames['browse_iframe'].src=='browsechats.php'){
parent.frames['browse_iframe'].refresh(); // this is the error
}
else{
parent.frames['browse_iframe'].src='browsechats.php';
}
}
//-->
</script>


Cylix wrote:
Quote:
function refreshOtherIframe(){
parent.document.getElementById('otherIframe').refr esh();
}

For me, I will
if (parent.frames['otherframe']) parent.frames['otherframe'].refresh();


Reply With Quote
  #4  
Old   
Cylix
 
Posts: n/a

Default Re: iframe to parent to iframe - 08-06-2006 , 09:26 PM




Lee wrote:
Quote:
I got this error after running this code. Any help? Thanks.

Error: parent.frames.browse_iframe.refresh is not a function

<script language="javascript"
<!--
if (parent.frames['browse_iframe']){
if(parent.frames['browse_iframe'].src=='browsechats.php'){
parent.frames['browse_iframe'].refresh(); // this is the error
}
else{
parent.frames['browse_iframe'].src='browsechats.php';
}
}
//--
</script


Oh sorry, it should be parent.frames['browse_iframe'].location.reload();



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.