0

Help with browser close (without the button close)

asked 2011-05-25 15:40:11 +0800

zippy gravatar image zippy
504 1 2

updated 2011-05-25 16:47:16 +0800

Hi, i have a class called 'Wifi', with two methods, turnOn() and turnOff()
In the controller i have a class defined :

public Wifi myWifi = new Wifi();
...

myWifi.turnOn();

So , in the controller i turnOn() the wifi , but when the user close (without the button "close"), the wifi is turnOn forever xD , then i need to "detect" this situation and call the method turnOff(). I tried to use the java garbage collector (with finally) but dont work for me, also i tried yo implement desktopcleanup, but my problem is dont understand the implementation=(
The important is turnOff the wifi when the session is timeout, no matter when the user close/change the page.

Thanks

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-05-25 17:50:53 +0800

zippy gravatar image zippy
504 1 2

hi, i use the listener desktop cleanup.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-05-25 15:40:11 +0800

Seen: 203 times

Last updated: May 25 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More