/    Sign up×
Community /Pin to ProfileBookmark

refresh an frame from an other frame

I have made 5 iframes on a page name:main
from my iframe name:handler
I like to refresh iframe name:tyntd
without doing anything with iframe name:handler
How do I do that?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@deep_dhyaniAug 30.2005 — you can do that.

<iframe onLoad="document.frames.tyntd.location.reload()" name="handler"></iframe>

<iframe name="tyntd"></iframe>
Copy linkTweet thisAlerts:
@reverentxauthorAug 30.2005 — I have now tryed several tests but it do not seems to work that way!

is there any special place to place the script.

is it posible to get it to wait to the whole page is loaded and database is updated

10 sec?

And it should Refresh Iframe name=tyntd from

iframe name=handler when its finished uploading data to the database
&lt;?php
$database= "UPDATE user SET minmax='$mini' WHERE id='$usrid'";
$result= mysql_query($database,$myconnection);
?&gt;
&lt;script&gt;&lt;onLoad="document.frames.tyntd.location.reload()" name="handler"&gt;&lt;/script&gt;


Can it be that i am using IFRAMES not FRAMES
Copy linkTweet thisAlerts:
@reverentxauthorAug 31.2005 — I have main "main.php" page

there is a mix of html-java-php

in the page I loads some IFRAMES

IFrame name=impnot page name: impnot.php

IFrame name=handler pagename: handler.php

from the "handler" I now need to refresh impnot OR reload impnot

but with a tiny delay of 10 sec becaurse it updates a database

and impnot is reading from this data..

I have tryed several surgestions from www but I cant get any of them to work.
<i>
</i>if (document.getElementById('impnot').src=='impnot.php')
document.getElementById('impnot').src='impnot.php';
Copy linkTweet thisAlerts:
@aditya_internetAug 31.2005 — Hi,

I tested the script posted by 'deep.dhyani' in Mozila Fire Fox which is giving error

Error: document.frames has no properties[/QUOTE]

I have fixed the script.

All you have to do is just add this part into your iframe tag

[B]onLoad="top.tyntd.location.reload()"[/B]

[code=html]<iframe onLoad="top.tyntd.location.reload()" name="handler" src="handler.php"></iframe>[/code]

If you want that handler.php should reload the page in tyntd iframe then you can add the following code in handler.php :

[CODE]<script>window.onload=top.tyntd.location.reload();</script>[/CODE]

I am not sure if this will help you, do let me know if this dint solved your problem and next time please give details in clear.
×

Success!

Help @reverentx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...