NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: CaseyR on October 14, 2013, 10:00:27 AM
-
Hi,
Is there anyway to execute code (in this case delete a session value) when the user clicks the Close button on a Form. I know nothing is actually closed; the browser just retrieves a new page, and the user can avoid the Close button by just calling a new page directly.
The intent is to deal with the browse tab/instance data integrity vulnerability by stopping users from opening another form if they haven't used the Save, Cancel, or Close to exit the last time they used the form.
Thanks.
-
Close button on the form? Are you sure you meant Close? Close buttons only appear on a form in View-Only mode...
cheers
Bruce
-
Thanks, Bruce
Yes, in view only mode. My thinking was that even though a form is in view only mode it still shares the same form queue as an editable version of the same form on another tab.
But in thinking about it more, if the session value is only created/deleted in editable forms, a view only instance of the form could not be opened if the editable form had not been saved or cancelled. And if an editable instance of form is opened in another browse tab after a view only instance was opened, none of the changes made to the editable form will be saved to the view only record, so it doesn't matter.
Not exactly great UI, but it will have to do.
-
so, the short answer is no, the link that comes from the browser is just the "new page request". To get more information than that would require javascript code being added to the close button. (and I guess the OK and Cancel buttons.)
Cheers
Bruce
-
but you would be able to "see" that the close button was pressed in the WebHandler....
-
Thanks, Bruce. Where would I see it in the Web Handler?
-
ProcessLink method, before parent call - whatever you can see in the incoming log has been parsed at that point and is in the Value queue etc.
cheers
Bruce