NetTalk Central

Author Topic: Load page on session timeout  (Read 4360 times)

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
Load page on session timeout
« on: November 29, 2018, 01:43:33 PM »
NT: 10.36

In your NT 11 webinars you had one of your examples load a new page after the session timed out.  I can't see anywhere do do this in the documentation.  Is this new in NT 11 or do those of us still on NT 10 have it?
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Load page on session timeout
« Reply #1 on: November 29, 2018, 11:52:48 PM »
You have it in NT10.
The code goes into the PageFooterTag procedure in the Processes Code embed point.
(If you wizard up a new app it'll go in there.)

    if (p_web.GetSessionLoggedIn() and p_web.PageName <> p_web.site.LoginPage)
      ! parameter 1 is the session time
      ! parameter 2 is the name of the login page.
      ! parameter 3 is the id of the <div> in the html.
      p_web.Script('startCountDown('& int(p_web.site.SessionExpiryAfterHS/100) &',"'& clip(p_web.site.DefaultPage) &'","countdown");')
    end