Hi folks, My webpage has many tabs. One tab is running my formspider application. There are many things I like to do before the user closes formspider application. One is to record a log of user activity like when opened/closed the application etc. Is there a mechanism to capture the webpage closed event? Regards, George. |
Hi George, You can use "Close" event of the application to achieve your request (you can find this event under the "Events" tab existing in the application edit dialog). Note that once this event is defined, you have to close the application using the api_application.close API in the procedure called on this event.
Best Regards, Hi Ibrahim, Thank you. Unfortunately this procedure is not firing either when the application running tab is closed or when the webpage as a whole is closed. However, if I invoke the same procedure using a button the close procedure is executed. Can you suggest me how to solve this issue? Or is it a bug? regards, George
(25 Feb '13, 07:02)
George
How did you tested this? If you are trying to show popup to user on close event, it wouldn't work when browser tab is closed. You can only run db related actions such as logging because it is not possible to prevent closing of browser tab.
(25 Feb '13, 07:38)
oskansavli ♦♦
Hi, I have seen popups with the message, 'stay on page or continue and exit' when you try the close a page. Therefore I tried to put a popup on close. But as you told it does not work. But I tried to write to table and the same is worked. But just as I told above I also like to give a warning message to the user when he is closing. Thank you for your answer. George.
(25 Feb '13, 08:04)
George
You can use "Application Unload Message" under "Edit Application --> Browser Settings" to always notify user before close. To only notify when something is changed, you can set this on runtime by using api_application.setBrowserMessage().
(25 Feb '13, 08:22)
oskansavli ♦♦
I tried api_application.setBrowserMessage() but unfortunately this is also not working. Thank you any way. Do you have any other work around?
(25 Feb '13, 13:32)
George
How do you apply it? I put the code in my close procedure. Popup message is working when closing the application through close button. But with setBrowserMessage no message is displayed.
(25 Feb '13, 13:37)
George
It is not an api that shows a popup to user immediately, instead it just sets the message that user will be notified before exit.
(25 Feb '13, 14:00)
oskansavli ♦♦
showing 5 of 7
show 2 more comments
|