Click to See Complete Forum and Search --> : how to refresh a parent window by clicking a button from a child window?


koel78
06-10-2003, 07:17 AM
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?

pyro
06-10-2003, 07:24 AM
To refresh a parent window from the child:

window.opener.refresh();

pyro
06-10-2003, 08:09 AM
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...