NetTalk Central

Recent Posts

Pages: 1 ... 4 5 [6] 7 8 ... 10
51
Web Server - Ask For Help / Re: Index Page has losts its menu
« Last post by Richard I on September 24, 2026, 08:59:06 PM »
Hi Ron,
Ive got it back thanks
I was calling the login form first instead of the Index Page....where prviously I was calling the login form FROM the Index page....
So all good now, almost !
Cheers
Richard
52
Web Server - Ask For Help / Re: Webhooks in Nettalk?
« Last post by rjolda on September 24, 2026, 03:15:12 PM »
HI Ton,
Very interesting article.  Perhaps you might want to share how you use webhooks in NetTalk and why.
Thanks,
Ron
53
Web Server - Ask For Help / Re: How to execute code once of Form Load?
« Last post by rjolda on September 24, 2026, 12:48:58 PM »
Hi Johan,
I wanted to capture the last SAVE to File event and run code there.  I put an embed there and traced the stage each time that it ran and I found that p_stage=65536  was the embed point at the very end.  I put code there and it only runs ONCE.  So, I would suggest you place a debug trace on the embed you want and see what stage it runs at and see if you can isolate a stage (by number) that runs only ONCE.
I am not sure that it is best practice but it works ! ( forms can get called many times as the web server services other calls and keeps coming back to the open form for that user)
Ron
54
Web Server - Ask For Help / Re: Index Page has losts its menu
« Last post by rjolda on September 24, 2026, 12:36:54 PM »
HI Richard,
I have had the menu go wonky several times.  I use a double drop menu.  Sometimes after editing a menu item, it goes wonky and goes to Task Panel or Accordion and is half missing.  So, I would check that first. 
Ron
55
Web Server - Ask For Help / Index Page has losts its menu
« Last post by Richard I on September 24, 2026, 03:41:48 AM »
Please tell me how I can restore the Menu to visible view  in my PageHeaderTag
Everything looks ok in there.
I dont know why or how it fell off other than I have been playing with Themes syles and scripts...
Thanks
Richard
C12.4000 NT 14
56
Web Server - Ask For Help / How to execute code once on Form Load?
« Last post by JohanR on September 24, 2026, 02:43:47 AM »
Hi,

What is the preferred method or embed to ensure code only runs once on form generation, popup or page loaded.

I am currently using
if (p_web.GetValue('SignInResetPassword_form:inited_') = 1)

Using code below, it runs through twice, even if checking on p_web.SetValue('SignInResetPassword_form:inited_',1)
Attached code and debuglog for initform and preupdate code/logs


thanks for any advice

Johan


InitForm       Routine
  DATA
LF  &FILE
! Start of "Initalize the Form before anything else is done"
! [Priority 5000]
! End of "Initalize the Form before anything else is done"
  CODE
  ! Start of "Initalize the Form before anything else is done"
  ! [Priority 5000]

  ds_OutputDebugString('>>> InitForm <<<' & format(clock(),@t06))
  if (p_web.GetValue('SignInResetPassword_form:inited_') = 1)
     ds_OutputDebugString('========== 2nd time' & format(clock(),@t06))
  else
     ds_OutputDebugString('========== 1st time' & format(clock(),@t06))
  end
 
  ! End of "Initalize the Form before anything else is done"
  p_web.SetValue('SignInResetPassword_form:inited_',1)
  p_web.formsettings.file = ''
  p_web.formsettings.key = ''
  do RestoreMem
  ! Start of "Initalize the Form before anything else is done"
  ! [Priority 5000]
57
Web Server - Ask For Help / Re: Webhooks in Nettalk?
« Last post by AtoB on September 24, 2026, 01:11:16 AM »
Been working on this (quite a bit of work actually), but for anyone interested, I think this is a really good resource : https://webhooker.eu/blog.

Also there are services that (like this webhooker) take care of the pesky details
58
Web Server - Ask For Help / Re: Custom response headers
« Last post by the_question on September 23, 2026, 01:45:10 AM »
This is inside NetWebHandleRequest:

Code: [Select]
p_web.CreateHeader PROCEDURE(NetWebServerHeaderDetailsType p_HeaderDetails)

ReturnValue          ANY

! Start of "NetTalk Method Data Section"
! [Priority 5000]

! End of "NetTalk Method Data Section"

  CODE
  ! Start of "NetTalk Method Executable Code Section"
  ! [Priority 2500]
 
     
      p_HeaderDetails.CustomHeader = CLIP(p_HeaderDetails.CustomHeader) & |
        '<13,10>Cross-Origin-Opener-Policy: same-origin' & |
        '<13,10>Cross-Origin-Embedder-Policy: require-corp'
     
  ! Parent Call
  ReturnValue = PARENT.CreateHeader(p_HeaderDetails)
  ! [Priority 7500]
 
  ! End of "NetTalk Method Executable Code Section"
  RETURN ReturnValue
59
Web Server - Ask For Help / Re: Custom response headers
« Last post by Bruce on September 21, 2026, 01:16:02 PM »
show your code, and where it goes.
60
Web Server - Ask For Help / Re: Small and fast response
« Last post by Bruce on September 21, 2026, 01:12:49 PM »
I think you'll find the current error fits inside the minimum TCP packet size. You won't see any performance difference making it smaller.

But of course you can derive your own code into the SendError (or wherever) to send back whatever you like.
Pages: 1 ... 4 5 [6] 7 8 ... 10