Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 javascript question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

NancyA
Starting Member

17 Posts

Posted - 09 November 2001 :  20:04:32  Show Profile
I wanted to call a function that would, when a page regains focus, auto refresh or reload that page. I have it working in vbscript:

<script language="vbscript">
sub window_onfocus()
window.location.reload
end sub
</script>

Does javascript have a similar window_onfocus function? This vbscript code only works in IE.

Thanks for any help - Nancy

wdworld
Starting Member

Canada
24 Posts

Posted - 09 November 2001 :  20:59:12  Show Profile  Visit wdworld's Homepage
I'm far from being an expert in Javascript but this link :

http://www.projectcool.com/developer/reference/ _obj.html

confirms that the object which has the reload method is : Location. On the other hand, it doesn't handle the event OnFocus... the object window does.

Maybe this site http://www.w3schools.com/ could help you for Javascript and a few other programming languages.

Hope this helps

Charles
http://www.wdworld.com

Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 12 November 2001 :  05:05:51  Show Profile  Visit Kat's Homepage
try this in the body tag:

onFocus="window.location.reload();"

KatsKorner
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07