How To Trap Attempts At Closing The Browser Running A Forms Application

1. If you are using Oracle Jinitiator, open basejini.htm for edit. If you use the Sun Java Plug-in (JRE), open
basejpi.htm. These files can be found in the Oracle Home \forms\server directory.
2. Change the html code as follows:

<script language="JavaScript">
function handleCloseEvent(evt)
evt = window.event;
evt.returnValue = "Closing the browser will cause all uncommitted data to be lost."; }
<BODY %HTMLbodyAttrs% onbeforeunload="handleCloseEvent(event)">


If a user attempts to close the browser another window will be presented:
Ref:[ID 605327.1]


About Sher khan

Senior Oracle DBA, Oracle 10g , Oracle 11g OCE ,Oracle 12C and Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g , 11g and 12C. I am working in Oracle technology since 2004. Currently working in U.A.E Email:
This entry was posted in Oracle Application server. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s