cancel
Showing results for 
Search instead for 
Did you mean: 

Close window from OnInputProcessing event

0 Kudos
235

Hi all.

I'd like to close a BSP page when clicking one button, instead of the browser close button, but I need to do some validations before. So I've thought to catch the button in OnInputProcessing event, make the validations and finally close the window.

I've tried with navigation->exit( '' ). but it keeps a blank page.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184111
Active Contributor
0 Kudos

Hi Luis,

You can set a flag in OnInputProcessing after your validations and in layout check this flag and call window,close.

<% if flag = 'X'  .%>
<s cript type='text/js'>
w i n d ow . c l o se ();
</s cript>
<% endif. %>

How to avoide the confirmation popup...

I am also looking forward to the solutions...

Regards,

Anubhav

0 Kudos

Hi Anubhav.

It works fine, thank you.

Answers (1)

Answers (1)

RenaldWittwer
Contributor
0 Kudos

Hi,

I had the same problem. My solution is to navigate to a page that close the browser with JavaScript.

Create a new page, close_window.htm for example. In OnInput you navigate to this page after your validations. The new page close the browser with Javascript window.close()

Best regards

Renald

0 Kudos

Hello Renald.

Thank you for your support, although new page does not look so smart. Anyway, it would be possible to avoid the confirmation popup raised by the browser?

Regards,

Luis.