NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on November 15, 2014, 11:55:53 AM
-
Hallo,
I have a login form with 2 tabs. The strange effect I see is that when the user or password is wrong and the validation message popup. Now when user close this message tab2 is selected.
I duplicate this also in examples. How can I avoid the focus to tab2? I want focus stay on tab1.
Anyone has a solution for this?
Thank you,,
Robert
[attachment deleted by admin]
-
I would need an example to duplicate this to understand it Robert.
Note that tabs are numbered from 0, so if you are setting a tab number in code, you need to count from 0.
cheers
Bruce
-
Hallo Bruce,
>>Note that tabs are numbered from 0, so if you are setting a tab number in code, you need to count from 0.
Yes I know. It's nothing about this...see attached example. It's very easy to duplicate. just put wrong user or password and you will see the effect I'm talking about.
Robert
[attachment deleted by admin]
-
please include dct and tps files with example...
-
example 3 attached.
[attachment deleted by admin]
-
hi Robert,
The problem is a side effect of where the Loc:Invalid is being set. Unlike generated code, the LoginForm does the validation in the ValidateUpdate routine.
To correct the problem add the following line in, if the login is invalid.
Loc:InvalidTab = 0
for example;
if upper(Loc:Login) = 'DEMO' and upper(Loc:Password) = 'DEMO' and p_web.GetValue('hash') = p_web.GetSessionValue('hash')
p_web.ValidateLogin()
p_web.SetSessionValue('hash',0)
p_web.SetSessionLevel(1)
Else
loc:invalid = 'Loc:Login'
Loc:InvalidTab = 0
p_web.SetValue('retry','LoginForm')
loc:Alert = 'Login Failed. Try Again.'
End
Cheers
Bruce