Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh on Focus

Status
Not open for further replies.

KizMar

Technical User
Mar 13, 2002
52
US
How do you code a page so when the window "focus()" is set the page will refresh?
 

Probably something like:
Code:
window.onfocus = self.location.reload();
but it would just refresh and refresh and refresh endlessly. Seems a bit daft.
 
I figured out a way to do it. Thank you though!
 
You "...figured out a way to do it..." ? What were you trying to do exactly? I'm with theboyhope - why would you want to continually reload the same page?

Please explain!?!?

Pete.


Web Developer / Aptrix CMS (LWWCM) Specialist
w: e: Pete.Raleigh(at)lclimited.co.uk
 
The long story is I was opening a popup window and then at a later point closing it. I didn't have the syntax correct to "reload" the parent window from the logoff routine. I hadn't used that method before and didn't know you had to use "location" just before it. So at the end of the logoff aspx page I'm just doing:

<script language=javascript>
opener.location.reload();
self.close();
</script>

Before I thought that somehow I was losing the &quot;opener&quot; object, but I just wasn't calling it correctly to use the &quot;reload&quot; method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top