cancel
Showing results for 
Search instead for 
Did you mean: 

BSP Application at the time of closing browser

Former Member
0 Kudos

Hi,

When ever I am doing booking a course or starting  a course or closing the course pop-up an event (_ONINITIALIZATION) is called.

I would like to know which event will be called when the main browser is called ?

Can we handle this through BSP Application?

Please give your valuable ideas .

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can do this with javascript, copy paste the below script under the <head></head> tag in your .htm.


  <script type="text/javascript">
window.onbeforeunload = function (event) {
     var message = 'Important: Please click on \'Save\' button to leave this page.';
     if (typeof event == 'undefined') {
         event = window.event;
     }
     if (event) {
         event.returnValue = message;
     }
     return message;
};
</script>

Javascript is a client side script while BSP ABAP events are server based. See if you can achieve what you need to with client side scripting otherwise you will need to call server event from javascript.