Click to See Complete Forum and Search --> : Refresh Opener
adamb131
06-04-2003, 09:22 PM
Is this possible, if so, how do I approach it.
I have a browser window that displays the status of training accounts. From an icon on this page the user can sit an assessment by clicking to spawn a pop-up with the questions to be answered. What I want to do is when the user is finished the questions and they submit their answers that this refreshes the original status window with the users latest scores. I have played with window.loader but just havent been able to put it all together.
Any assistance much appreciated...
Thanks AdamS :confused:
try window.opener.refresh()
adamb131
06-04-2003, 10:15 PM
Tried that but couldn't get it to work...
Main Window
<html>
<head>
<title>JS1</title>
<script language="JavaScript">
function redo(){
//JS2 = 'js2.asp';
//document.location=JS2;
window.open('js2.asp','js2','width=300,height=200, top=25, left=25');
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<p><b>JS1</b></p>
<form name="form1" method="post" action="">
<input type="button" name="Button" value="Open 2nd Page and give name" onClick="redo();">
</form>
<p> </p>
<p> </p>
<p>
</p>
<p>This Page Loaded: <%= time() %></p>
<p><script language="JavaScript">document.write("The current URL is " + document.URL)</script></p>
</div>
<script language="JavaScript">
//onClick="window.open('js2.','js2','width=300,height=200, top=25, left=25');"
</script>
</body>
</html>
Popup Page...
<html>
<head>
<title>JS2</title>
<script language="JavaScript">
this.window.name = JS2
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<p><b>JS2.asp</b></p>
<p> </p>
<p><b>
<input type="submit" name="Submit" value="Submit" onClick="window.opener.refresh()">
</b></p>
</div>
</body>
</html>
<script language="JavaScript">
//newwin=window.open('js3.asp','js3','width=300,height=200, top=25, left=25');
</script>
have you tried
opener.location.reload(true)
adamb131
06-05-2003, 01:18 AM
function refreshMain() {
window.opener.location.href = "js1.asp";
}
js1.asp being the main window just load the page again.
:) :D :p