NetTalk Central

Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Web Server - Ask For Help / Re: NetWebServiceMethod
« Last post by Jane on April 30, 2026, 09:17:53 PM »
Are you trying to send JSON to a web browser or to a client of some sort?

There's a NetTalk example WebServiceRequiresXFiles (77) that includes two apps - a client and a web server.

It's also often useful to use the netdemo example program as a web client to debug what you're doing.
22
Web Server - Ask For Help / Re: NetWebServiceMethod
« Last post by seanh on April 30, 2026, 06:24:55 PM »
have you set the content type?
net.ContentType = 'application/json'
23
Web Server - Ask For Help / NetWebServiceMethod
« Last post by rupertvz on April 30, 2026, 01:09:47 PM »
Hi Guys,

I'm working with NetTalk WebServer and using a NetWebServiceMethod procedure.

I can successfully call the endpoint and the procedure executes, but I'm struggling to get a JSON response to return in the browser. Currently, the request runs, but the response is blank when JSON is selected.

I have:

A queue defined for return (Q)
JSON enabled in the template
ServiceMethod populating the queue

However, it seems like the JSON branch in BuildResult / BuildResultFields is not being generated or executed.

My questions:

Is there a recommended example app or webinar showing a working NetWebServiceMethod returning JSON?
Should JSON responses for queues be handled purely via template, or is manual handling (e.g. AddJSONFromQueue) expected?
Is there a standard pattern for returning simple JSON (without queues)?

Any guidance or working example would be appreciated.
24
Web Server - Ask For Help / Re: API hangs on memo field
« Last post by Bruce on April 28, 2026, 08:48:54 PM »
sounds like a bug in Reflection. I'll take a look.
25
Web Server - Ask For Help / API hangs on memo field
« Last post by jlavera on April 28, 2026, 06:31:51 AM »
I have a rest server API. Recently upgraded to NT 14.37, and all the latest versions of ST, Reflection, jFiles, etc.
There is a complex topspeed file with lot of fields and some memo fields. The API receive just a few of them, ignoring the rest.
There is generated code that does this:
DocParm:App_Rosters.SetAttribute('table',DocParm:App_Rosters.TableFieldToColumn(App_Rosters,'AppRosters:CancelDescription'),'readonly')    DocParm:App_Rosters.SetAttribute('table',DocParm:App_Rosters.TableFieldToColumn(App_Rosters,'AppRosters:CancelDescription'),'private')
And it hangs on either one.
I debugged until I found that in Reflection.clw, there is a
ReflectClass.TableFieldToColumn              Procedure(FILE pTable,String pLabel)
where this call does a loop in the "record"... but it is not counting or processing the memo fields. It looks for the field name in the structure, but it is not there, as a memo, it is not part of the structure. The result is it never ends the loop and the server hangs.

Anyone sees this? Is this a bug, or I'm missing a setting (which I cannot find)?

Kind regards,
Jorge Lavera
26
Web Server - Ask For Help / Re: webserver example 79
« Last post by Bruce on April 22, 2026, 05:55:48 PM »
trying to create a self signed certificate
CreateSelfSignedCertificate.bat

That Bat file is not used anymore.
On the Certificates tab (in the running program)
Simply put the server address into the "domain" box, and click on "Certificates" button.
The address is typically just he machine name (like Daisy) or an Ip address (192.168.1.1)

see https://www.capesoft.com/docs/NetTalk14/NetWebRuntimeSettings.htm
28
Web Server - Ask For Help / Calling a javascript function
« Last post by rjolda on April 22, 2026, 07:38:59 AM »
Hi
C11.1 NT 14.37
I have a javascript function called move().

I have a button and i want to execute the move() function when the button is pressed.
I have tried multiple permutations and this is my current permutation for the button embed.  However, it is not correct as the function does not execute.
This is the current iteration:
p_web.script('$(''["move()"]'').call();')
Can someone help me with the correct syntax to call this function from a NT button?
THanks,
Ron
29
Web Server - Ask For Help / Re: Progress Bar woes...
« Last post by rjolda on April 21, 2026, 12:28:20 PM »
Hi All,
I was trying too much trickery... going to try to implement a javascript progress bar.  It will operate without server communication for the duration of 45 seconds.  I simply want to keep it contained within the client and not have to hit the server for progress bar updates...
I am sure that I will have questions on implementing the javascript progress bar.
Ron
30
Web Server - Ask For Help / Progress Bar woes...
« Last post by rjolda on April 21, 2026, 07:07:45 AM »
Hi,
Using C11.1 and NT 14.37.
I have a procedure with a javascript timer and I am trying to turn on the progress bar and time it down with my timer.  My timer DOES work correctly but I can't get my progress bar to show up.
On Memform.   I have a progress field with the Equate of: ProgressName with a timer of 3500 and NO Hyperlink creation.
My TimerButton is firing every 2 seconds and I have the ProgressName as a field to be updated with this control.
I create the Progress Bar with:
   
!     ! initialize the progress bar
  loc:ProgressName = p_web.GetValue('_ProgressName_')
  p_web.SetProgress(loc:ProgressName,1,'')

Then, in my Timer button, I have this code:
    if int(p_web.GSV('countervalue')) <= 45 and p_web.GSV('countervalue') <> '-'
         if  int(p_web.GSV('countervalue')) <=1
                p_web.SSV('countervalue','Drawer will close soon..')   
                p_web.SetProgress(loc:ProgressName,100,'' )
         ELSE
               p_web.trace('counter value: ' & p_web.GSV('countervalue'))
                p_web.SSV('countervalue',int(p_web.GSV('countervalue')-2))
                 PercentageComplete = int(p_web.GSV('countervalue')) * 2       ! calculate the percentage complete, using whatever code is applicable to your process
                p_web.SetProgress(loc:ProgressName,PercentageComplete,'') ! set the progress bar to that number.
         end     
     end     

As I said, my timer counts down but progress bar does NOT show up.  What am I missing?
THanks,
Ron
Pages: 1 2 [3] 4 5 ... 10