/    Sign up×
Community /Pin to ProfileBookmark

how to refresh a parent window by clicking a button from a child window?

page tq.html
<html>
<head>
<script language=”javascript”>
function mywin()
{
window.open(‘tt.html’,’Parent’,300,500);
}
</script>
</head>
<body>
<form>
<input type=”button” onClick=”mywin()”>
</form>
</body>
</html>

page tt.html

<HTML>
<HEAD>
<script language=”javascript”>
function check()
{
var t=window.parent.name;

}
</script>
</HEAD>
<BODY>
<FORM name=”frm1″>
<INPUT TYPE=”button” VALUE=”Click here to refresh parent window” onClick=”check()”>
</FORM>
</body>

i have a button in the page tq.html,if i click that control goes to tt.html.if i click the button in tt.html i need to refresh my tq.html is that possible?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@pyroJun 10.2003 — To refresh a parent window from the child:

window.opener.refresh();
Copy linkTweet thisAlerts:
@pyroJun 10.2003 — You're right... I was thinking of reload, and I got the syntax wrong, either way... :eek: There is, however, a refresh() method (http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/ref_r-r.htm#37499), but is used to refresh newly installed plugins...
×

Success!

Help @koel78 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.14,
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,
)...