This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
16
Web Server - Ask For Help / Re: Avoid downloaded file been served from browser cache
« on: May 13, 2025, 06:44:16 AM »
first you need to determine if it's coming from the local client cache, or the server cache.
(Both the browser, like Chrome or Edge) and the NetTalk server can cache files.
There are headers you can set when serving the file to indicate it's uncacheable. (You can google for that if you like, or look in netweb.clw.)
Alternatively you can alter the URL - by adding a random parameter. For example;
capesoft.com\somefile.saf?r=123
is different from
capesoft.com\somefile.saf?r=321
So simple by adding a parameter (which the server happily ignores) with a random value, the client won't get it from cache.
Obviously though it depends on how they are seeing the URL in the first place to download the file.
Cheers
Bruce
(Both the browser, like Chrome or Edge) and the NetTalk server can cache files.
There are headers you can set when serving the file to indicate it's uncacheable. (You can google for that if you like, or look in netweb.clw.)
Alternatively you can alter the URL - by adding a random parameter. For example;
capesoft.com\somefile.saf?r=123
is different from
capesoft.com\somefile.saf?r=321
So simple by adding a parameter (which the server happily ignores) with a random value, the client won't get it from cache.
Obviously though it depends on how they are seeing the URL in the first place to download the file.
Cheers
Bruce
17
Web Server - Ask For Help / Re: MObile device (Phone) @media screen and (max-width: 600px) FONT SIZE question
« on: May 08, 2025, 06:04:41 PM »18
Web Server - Ask For Help / Re: Webclient with certificat
« on: May 08, 2025, 06:03:43 PM »
Not sure if this is helpful - but see NetDemo, NetWebClient, "Secure HTTPS Options" tab, Client Certificate option.
If you can get it working from there, you'll be golden.
Cheers
Bruce
If you can get it working from there, you'll be golden.
Cheers
Bruce
19
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« on: May 04, 2025, 09:50:26 PM »
>> But the customer wants it like this:
http://127.0.0.1/WasteInvoice/InvoiceOverview/account/{accountId}/customer/{customerId}
Have you told him how much extra that pattern will cost? I find that putting a price on it lets you determine how much they "actually want it".
>> Does that make sense?
yes.
To do this though you will need to parse the WholeURL yourself, likely in webHandler, setting the values as you interpret them (ie with a call to SetValue).
It's not terribly hard to do, but obviously is a custom approach to both parsing the values, and then redirecting the request to the correct API.
For example, in this URL I presume WasteInvoice is the name of the NetWebService, and InvoiceOverview is the name of the NetWebSericeMethod.
You *may* find it parses that sufficiently to get the call into the NetWebServiceMethod procedure, or you may need to parse it in webHandler.
Once you are in the method, you can then parse the URL further to find the account and customer ID. That's pretty easy to do with StringTheory etc.
Cheers
Bruce
http://127.0.0.1/WasteInvoice/InvoiceOverview/account/{accountId}/customer/{customerId}
Have you told him how much extra that pattern will cost? I find that putting a price on it lets you determine how much they "actually want it".
>> Does that make sense?
yes.
To do this though you will need to parse the WholeURL yourself, likely in webHandler, setting the values as you interpret them (ie with a call to SetValue).
It's not terribly hard to do, but obviously is a custom approach to both parsing the values, and then redirecting the request to the correct API.
For example, in this URL I presume WasteInvoice is the name of the NetWebService, and InvoiceOverview is the name of the NetWebSericeMethod.
You *may* find it parses that sufficiently to get the call into the NetWebServiceMethod procedure, or you may need to parse it in webHandler.
Once you are in the method, you can then parse the URL further to find the account and customer ID. That's pretty easy to do with StringTheory etc.
Cheers
Bruce
20
Web Server - Ask For Help / Re: Refresh NWB Header
« 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
21
Web Server - Ask For Help / Re: Refresh NWB Header
« on: April 23, 2025, 07:18:51 PM »
define what you mean by "browse header" ?
22
Web Server - Ask For Help / Re: Pass parameter in servercall?
« on: April 16, 2025, 06:45:26 PM »
p_web.StoreValue('a')
Is the best way to set a session value to a value, because then if the value doesn't exist (as a parameter) it does not overwrite the session value.
I expect you are just overwriting your session value to blank when the value does not exist.
Is the best way to set a session value to a value, because then if the value doesn't exist (as a parameter) it does not overwrite the session value.
I expect you are just overwriting your session value to blank when the value does not exist.
23
Web Server - Ask For Help / Re: NT map: clickable markers does not work work on mobile
« on: March 31, 2025, 07:21:11 PM »
just out of curiosity - does a double tap on the phone open them?
Does the first tap open the tooltip?
Does the first tap open the tooltip?
24
Web Server - Ask For Help / Re: Wrong encoding of text on maps
« on: March 24, 2025, 11:43:24 PM »
thanks - fixed for 14.30
25
Web Server - Ask For Help / Re: Button on header
« on: March 24, 2025, 10:09:05 PM »
not really. I had no success making this work.
26
Web Server - Ask For Help / Re: NT Maps - update calling different table/record
« on: March 24, 2025, 10:07:48 PM »
depends if the page is in popup mode or page mode.
You can't set a parameter easily from the Map side, since it's called directly from javascript, but you might be able to set a parameter on the browse side. And then check for that parameter (GetValue) in the form.
You can't set a parameter easily from the Map side, since it's called directly from javascript, but you might be able to set a parameter on the browse side. And then check for that parameter (GetValue) in the form.
27
Web Server - Ask For Help / Re: NT Maps - update calling different table/record
« on: March 23, 2025, 11:28:36 PM »
>> the approach of having a second update form on the update form for the point record, is that a good approach?
no.
A better approach, one that will work, is to call the form you want to call. In the example you sent me that would be UpdateUser, in your real app I expect it's UpdateJob, or whatever.
So now the issue is getting the correct record loaded in that table. I'll refer to the example you sent - the map is plotting the accidents, but you want to UpdateUser. So in UpdateUser, in the InitForm routine you need to prime the GUID value of the user to edit.
At this point all you have is the sesison value for the Accident. So the code goes something like this;
Access:Accident.Open()
Access:Accident.UseFile()
Acc:Guid = p_web.GSV('Acc:Guid')
Access:Accident.TryFetch(Acc:GuidKey)
User:Guid = Acc:UserGUID
Access:Accident.Close()
p_web.SetValue('Use:Guid',Use:Guid)
p_web.SetSessionValue('Use:Guid',Use:Guid)
This loads the Use:Guid into the Value, and SessionValue queues, and from there the form can take over.
Cheers
Bruce
no.
A better approach, one that will work, is to call the form you want to call. In the example you sent me that would be UpdateUser, in your real app I expect it's UpdateJob, or whatever.
So now the issue is getting the correct record loaded in that table. I'll refer to the example you sent - the map is plotting the accidents, but you want to UpdateUser. So in UpdateUser, in the InitForm routine you need to prime the GUID value of the user to edit.
At this point all you have is the sesison value for the Accident. So the code goes something like this;
Access:Accident.Open()
Access:Accident.UseFile()
Acc:Guid = p_web.GSV('Acc:Guid')
Access:Accident.TryFetch(Acc:GuidKey)
User:Guid = Acc:UserGUID
Access:Accident.Close()
p_web.SetValue('Use:Guid',Use:Guid)
p_web.SetSessionValue('Use:Guid',Use:Guid)
This loads the Use:Guid into the Value, and SessionValue queues, and from there the form can take over.
Cheers
Bruce
28
Web Server - Ask For Help / Re: web26 example File Upload
« on: March 23, 2025, 09:56:01 PM »
The example is confused by the existence of the Doc:Name field twice on the form, once as a string and once as a file upload. I'll play around with that a bit, but in the meantime if you remove the second field then I think the form will work as you are expecting.
29
Web Server - Ask For Help / Re: Modify the lookup procedure?
« on: March 23, 2025, 09:03:03 PM »
>> I have a client that no longer wants to store dates in his app. Instead, he wants to store the number of days from a reference date.
I strongly recommend you use Dec 28th, 1800 as the reference date. If you do this then there's effectivly nothing to do, just store the date as a LONG.
Cheers
Bruce
I strongly recommend you use Dec 28th, 1800 as the reference date. If you do this then there's effectivly nothing to do, just store the date as a LONG.
Cheers
Bruce
30
Web Server - Ask For Help / Re: Modify the lookup procedure?
« on: March 23, 2025, 09:00:21 PM »
>> You will need to run a debugger program to see the TRACE statements.
I recommend DebugView++. It's not a debugger, it's a message viewer.
>> I am lazy,
hard to see how it's less work than a single double-click.
Bruce
I recommend DebugView++. It's not a debugger, it's a message viewer.
>> I am lazy,
hard to see how it's less work than a single double-click.
Bruce