NetTalk Web Server > Web Server - Ask For Help

Login Page - One page on success, a different one on fail

(1/1)

PaulMacFarlane:
Using the default login page example I'm trying to go to one page if the login is successful and a different page on failure.

Reading through different posts I saw examples of:
    loc:formaction = 'SuccessPage'
    loc:formactiontarget = '_top'

and
        p_web.SetValue('_parentPage','SuccessPage')

neither seem to work.

Using the example code I can 'Authenticate' fine but can't seem to 'act' on it....

  if p_web.GetValue('loc:hash') = p_web.GetSessionValue('loc:hash')
    ! login checking goes here
    if p_web.Authenticate(Loc:Name,Loc:Passw) = true ! WebHandler, Authenticate method needs to be fleshed out.
      p_web.ValidateLogin()                   ! this sets the session to "logged in"
      p_web.SetSessionValue('loc:hash',0)         ! clear the hash, so this login can't get "replayed".

        p_web.SetValue('_parentPage','SuccessPage')

else

        p_web.SetValue('_parentPage','FailedPage')
end
end

I think I'm completely off base !

Alberto:
Hi, try using...

p_web.Script( p_web.WindowOpen( 'YourPage') )

regards

PaulMacFarlane:
Thank you !  That works.

Navigation

[0] Message Index

Go to full version