NetTalk Central

Author Topic: Refresh NWB Header  (Read 3655 times)

rupertvz

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Refresh NWB Header
« 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?

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
    • Email
Re: Refresh NWB Header
« Reply #1 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

rupertvz

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: Refresh NWB Header
« Reply #2 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?

Jane

  • Sr. Member
  • ****
  • Posts: 392
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Refresh NWB Header
« Reply #3 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.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11300
    • View Profile
Re: Refresh NWB Header
« Reply #4 on: April 23, 2025, 07:18:51 PM »
define what you mean by "browse header" ?

rupertvz

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: Refresh NWB Header
« Reply #5 on: April 25, 2025, 01:19:17 AM »
Hi Bruce,

Kindly see attached for the HTML section for the NWB.

Regards
Rupert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11300
    • View Profile
Re: Refresh NWB Header
« Reply #6 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