brown2005 Posted May 8, 2006 Share Posted May 8, 2006 Is there anyway i can get a window to shut if someone comes away from it...I mean if someone has to view a website for 20 seconds before they can proceed... if they minimize it or go to another window can i automatically close my window?? Quote Link to comment https://forums.phpfreaks.com/topic/9337-focus/ Share on other sites More sharing options...
nogray Posted May 25, 2006 Share Posted May 25, 2006 a script can only close a window that was open by a script. Quote Link to comment https://forums.phpfreaks.com/topic/9337-focus/#findComment-38804 Share on other sites More sharing options...
brown2005 Posted June 1, 2006 Author Share Posted June 1, 2006 yeah thats what i want...say someone clicks on a link on my homepage a page pop-ups and they have to view this for say 20 seconds and they get 1 view to their record, however if they minimize it or go to another page i want to make it so they cant get 1 view and the page closes. Quote Link to comment https://forums.phpfreaks.com/topic/9337-focus/#findComment-40987 Share on other sites More sharing options...
king arthur Posted June 1, 2006 Share Posted June 1, 2006 Use an onblur event in the body tag of the window being closed or minimised. Quote Link to comment https://forums.phpfreaks.com/topic/9337-focus/#findComment-40990 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.