/    Sign up×
Community /Pin to ProfileBookmark

Refresh Opener

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 ?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@pyroJun 05.2003 — try window.opener.refresh()
Copy linkTweet thisAlerts:
@adamb131authorJun 05.2003 — 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>&nbsp;</p>

<p>&nbsp;</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>&nbsp;</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>
Copy linkTweet thisAlerts:
@JHLJun 05.2003 — have you tried

opener.location.reload(true)
Copy linkTweet thisAlerts:
@adamb131authorJun 05.2003 — function refreshMain() {

window.opener.location.href = "js1.asp";

}

js1.asp being the main window just load the page again.

? ? :p
×

Success!

Help @adamb131 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.18,
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,
)...