This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Servlets and the fly likes applets-javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "applets-javascript" Watch "applets-javascript" New topic


dhanjay singh

Joined: Jun 16, 2003
Posts: 2
i have written a program in javascript for loading the applet, which communicates with the socket program. the applet has logon,logoff and query buttons. I was struck when i wanted to write code for browser backbutton which when pressed the applet should logout and corrosponding logout message should be sent to the server socket program
Is there anyone who can help us in handling browser backbutton event.

Joined: Jul 06, 2000
Posts: 16
I don't know of a way to handle the back button specifically, but if you want to handle the generic event of the user leaving your page, you can override the stop() method of the applet. This method will be called whenever the user navigates away from the page that spawned the applet.
I agree. Here's the link:
subject: applets-javascript