81
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by Bruce on April 25, 2025, 10:46:32 PM »ahhh - so when you said "the browse header" you meant in a routine that you happened to name "header".
A small detail, that probably matters with regard to the answers.
The item you are updating in this header, is it specific to this user, or common across all users using the server? It seems like it's a value unique to this user?
Your best option is to make a small example app showing what it is you want to do, and I can look at that and suggest something from there...
Cheers
Bruce
A small detail, that probably matters with regard to the answers.
The item you are updating in this header, is it specific to this user, or common across all users using the server? It seems like it's a value unique to this user?
Your best option is to make a small example app showing what it is you want to do, and I can look at that and suggest something from there...
Cheers
Bruce
82
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by rupertvz on April 25, 2025, 01:19:17 AM »Hi Bruce,
Kindly see attached for the HTML section for the NWB.
Regards
Rupert
Kindly see attached for the HTML section for the NWB.
Regards
Rupert
83
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by Bruce on April 23, 2025, 07:18:51 PM »define what you mean by "browse header" ?
84
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by Jane on April 22, 2025, 10:10:23 AM »Check the web34 "Calculator" example app.
The Performance procedure has stats updated with websockets. (It's not on the menu so you need to enter the URL manually in your web browser.)
On the fields in the template, notice the "Live via WebSocket" checkbox ticked.
Check out this: https://www.capesoft.com/docs/NetTalk14/NetTalkWebBasic.htm#WebSockets
And search for "socket" on this page: https://www.capesoft.com/docs/NetTalk14/NetTalkWebFunctionality.htm#NetWebForm
If you have Bruce's book "Developing Web Applications with NetTalk - Fourth Edition" you can read the chapter on Web Sockets.
The Performance procedure has stats updated with websockets. (It's not on the menu so you need to enter the URL manually in your web browser.)
On the fields in the template, notice the "Live via WebSocket" checkbox ticked.
Check out this: https://www.capesoft.com/docs/NetTalk14/NetTalkWebBasic.htm#WebSockets
And search for "socket" on this page: https://www.capesoft.com/docs/NetTalk14/NetTalkWebFunctionality.htm#NetWebForm
If you have Bruce's book "Developing Web Applications with NetTalk - Fourth Edition" you can read the chapter on Web Sockets.
85
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by rupertvz on April 22, 2025, 02:30:54 AM »Thank you Niels,
I have not yet updated hostvalues via WebSocket.
Are you able to give me a little direction?
I have not yet updated hostvalues via WebSocket.
Are you able to give me a little direction?
86
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by Niels Larsen on April 21, 2025, 09:43:38 PM »Hi
When I do this, I use a host value updated via websocket. Then all logged in users see the value immediately.
/Niels
When I do this, I use a host value updated via websocket. Then all logged in users see the value immediately.
/Niels
87
Web Server - Ask For Help / Refresh NWB Header
« Last post by rupertvz on April 21, 2025, 09:39:41 AM »Hi All,
I have a value in the NWB header.
I would like to "refresh" this value, every time a new record is added via the NWF.
I tried enabling the option "Refresh Header on Save", but the NWF hangs when this option is selected.
Is there another way to refresh the value in the NWB header?
I have a value in the NWB header.
I would like to "refresh" this value, every time a new record is added via the NWF.
I tried enabling the option "Refresh Header on Save", but the NWF hangs when this option is selected.
Is there another way to refresh the value in the NWB header?
88
Web Server - Ask For Help / Re: Changing theme has no effect (RESOLVED)
« Last post by Poul Jensen on April 19, 2025, 10:02:47 PM »OK.
But with data tables, the threaded connection strings you use need to be set on each thread. Hence the suggestion to set them in ProcessLink each time a thread runs.
My point was that once you set a theme, you do not need to set it again each thread. It's sticky to the session, not to a thread.
That said, the one time that you set the theme can be with the rest of the stuff you're doing in ProcessLink - no need to have separate code to do it in PageHeaderTag.
Set the theme once in ProcessLink, and set the threaded connection strings there each time.
Noted.
Thanks for your comments.
89
Web Server - Ask For Help / Re: Changing theme has no effect (RESOLVED)
« Last post by Jane on April 19, 2025, 11:01:13 AM »OK.
But with data tables, the threaded connection strings you use need to be set on each thread. Hence the suggestion to set them in ProcessLink each time a thread runs.
My point was that once you set a theme, you do not need to set it again each thread. It's sticky to the session, not to a thread.
That said, the one time that you set the theme can be with the rest of the stuff you're doing in ProcessLink - no need to have separate code to do it in PageHeaderTag.
Set the theme once in ProcessLink, and set the threaded connection strings there each time.
But with data tables, the threaded connection strings you use need to be set on each thread. Hence the suggestion to set them in ProcessLink each time a thread runs.
My point was that once you set a theme, you do not need to set it again each thread. It's sticky to the session, not to a thread.
That said, the one time that you set the theme can be with the rest of the stuff you're doing in ProcessLink - no need to have separate code to do it in PageHeaderTag.
Set the theme once in ProcessLink, and set the threaded connection strings there each time.
90
Web Server - Ask For Help / Re: Changing theme has no effect
« Last post by Poul Jensen on April 19, 2025, 01:32:57 AM »I think I have a solution now 
In Webhandler - ProcessLink this code:
and in PageHeaderTag - Processed Code this:

In Webhandler - ProcessLink this code:
Code: [Select]
!ANY PARAMETER? IF NOT DEFAULTS TO '1', BUT ONLY IF p_web.GSV('CommandA') IS NOT SET:
p_web.SSV('ChangeTheme', '0')
IF p_web.GetValue('a') <> ''
p_web.SetValue('CommandA', p_web.GetValue('a'))
p_web.SSV('CommandA', p_web.GetValue('a'))
!LOGS OUT
p_web.SSV('Med_Init', '')
p_web.SSV('Med_Navn', '')
p_web.SSV('Med_Email', '')
p_web.SetSessionLoggedIn(0)
p_web.SSV('ChangeTheme','1')
ELSE
IF p_web.GSV('CommandA') = ''
p_web.SetValue('CommandA','1')
p_web.SSV('CommandA', '1')
p_web.SSV('ChangeTheme', '1')
END
END
ds_outputdebugstring( 'Webhandler Processlink - p_web.GSV(CommandA) 2: ' & p_web.GSV('CommandA') )
!SETTING THE DATAPATH - A FOLDER OFF THE STATIC PATH IN GLO:StellarProgSti
GLO:RegnskabsNummer = p_web.GSV('CommandA')
p_web.SSV('GLO:RegnskabsNummer', GLO:RegnskabsNummer)
GLO:DataSti = CLIP(GLO:StellarProgSti) & '\' & p_web.GSV('CommandA')
p_web.SSV('GLO:DataSti', GLO:DataSti)
p_web.SSV('DataPath', p_web.GSV('GLO:DataSti'))
ds_outputdebugstring('Webhandler Processlink - GLO:DataSti: ' & p_web.GSV('DataPath'))
IF EXISTS( GLO:DataSti )
GLO:Inifil = clip(GLO:DataSti) & '\MobilService.ini'
p_web.SSV('GLO:Inifil', GLO:Inifil)
include('\pstellar_filename_defs_Slim.inc') !THIS IS WHERE THE FILENAMES ARE BUILD
!GETTING CUSTOMER NAME FROM INI
g:KundeNavn = GETINI('KundeProg','Kundenavn_' & p_web.GSV('CommandA') ,'' , clip(path()) & '\KundeProg.ini')
IF CLIP(g:KundeNavn) = ''
!GRABS DEFAUL:
g:KundeNavn = GETINI('KundeProg','Kundenavn' ,'' , clip(path()) & '\KundeProg.ini')
END
p_web.SSV('Kundenavn', g:KundeNavn)
!GETTING THEME FROM INI
GloTheme = GETINI('KundeProg','Theme_' & p_web.GSV('CommandA') ,'redmond', clip(path()) & '\KundeProg.ini')
p_web.SSV('theme', GloTheme )
ds_outputdebugstring('Webhandler Processlink - GloTheme: ' & CLIP(GloTheme))
ELSE
p_web.showInfo('ERROR IN PARAMETER.....')
ds_outputdebugstring('Webhandler Processlink - Path does not exist: ' & CLIP(GLO:DataSti) )
!AND SETS DEFAULT
p_web.SSV('CommandA', '1')
END
and in PageHeaderTag - Processed Code this:
Code: [Select]
IF p_web.GSV('ChangeTheme') = '1' AND p_web.GSV('theme') <> ''
ds_outputdebugstring('In PageHeaderTag - p_web.GSV(theme): ' & p_web.GSV('CommandA') & ' - ' & p_web.GSV('theme') )
p_web.ChangeTheme( p_web.GSV('theme') )
p_web.SSV('ChangeTheme', '0')
END