SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru johnjohn2's Avatar
    Join Date
    Apr 2004
    Location
    here
    Posts
    746
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    page focus event??

    Is there such thing as a on page focus event? I'd like to use some javascript to calculate some numbers when the page receives focus again. Is this possible?

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    window.onfocus should do what you're after, and you could construct an event handler using something like:

    Code:
    window.onfocus=function(){
    
    //do something
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •