NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: HPabon on June 06, 2012, 08:05:20 PM
-
Hi,
I have a form which allow the user to try to login up to three times. This form is called 'LoginForm'.
If the log in fails after three opportunities, I want to open another different form in the browser. The new form is called 'LoginFail'.
Any idea on how to to this?
Appreciate any help.
Hector
-
Hallo Hector,
Did you try this?
p_web.Script('window.location.href="LoginFail?";')
Robert
-
Hi Hector
Not sure I should be helping anyone with NTWS, but here is what I would try. <g>
Set a counter either in the session queue, or in a login file that keeps track of attempted logins.
Have 2 tabs on the form that has a "Tab Condition" eg.
VALID tab - p_web.GSV('login_counter') < 3
INVALID tab - p_web.GSV('login_counter') => 3
and set the condition according to the situation, and the correct tab will show.
Ideally this should be handled in your tps file that keeps track of the username, or the user will simply start a new session and retry.
Johan
-
Robert,
I tried what you suggest but get the following HTML source:
<script defer="defer">
window.location.href="NewsBrowsePage?"
</script>
HTTP/1.1 200 OK
Date: Fri, 08 Jun 2012 03:53:57 GMT
Server: NetTalk-WebServer/5.47
Expires: Thu, 09 Jun 2011
With the rest of the HTML page.
-
which embed did you try?
try on embed: GenerateForm > 6 After</form> put here the condition and code and try again.
Robert
-
Robert,
Now it works. :)
Many thanks for help with this one.