NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: rupertvz on September 05, 2012, 01:47:17 PM
-
Hi Guys,
I am using the LogoutForm from the example application.
It has the option "Are you sure you wish to log-out? Please click "YES" to log-out"
The two options buttons are defined by Generate From, Start
p_web.site.SaveButton.TextValue = 'Yes'
p_web.site.CancelButton.TextValue = 'No'
In ValidateUpdate, End, the following code logs out the user session;
p_web.SetSessionLoggedIn(0)
How do I add a condition to the logout code, NOT logout should the user select 'NO' ?
p_web.SetSessionLoggedIn(0)
Thanks
Rupert
-
Hi Rupert,
can you remind me which example you're looking a? I know one of them has that option, but most don't.
The approach "works" because the Cancel button ("no") does not trigger a ValidateUpdate.
If it's not actually working in the example, then there's a bug or something I need to look at. So let me know the example name.
cheers
Bruce
-
One example is in web3.app and it appears to work as advertised (if you don't want to logout, you don't get logged out)