21
Web Server - Ask For Help / Re: Can CSS respond to a clarion variable value and change the elements color?
« Last post by rjolda on May 30, 2025, 01:42:50 PM »Thanks,
I will give that a try! But - where do you put the css? You have to be putting it in the app and not the custom.css file. Does it go into css for the field itself?
Ron
I will give that a try! But - where do you put the css? You have to be putting it in the app and not the custom.css file. Does it go into css for the field itself?
Ron
22
Web Server - Ask For Help / Re: Can CSS respond to a clarion variable value and change the elements color?
« Last post by osquiabro on May 30, 2025, 03:54:41 AM »is possible, i use p_web.gsv('loc:css') in a field in a browse but in any field in a forms is a same concept, fill the variable with your css value and refresh the field
23
Web Server - Ask For Help / Can CSS respond to a clarion variable value and change the elements color?
« Last post by rjolda on May 29, 2025, 06:58:07 AM »Hi
Using NT 14.21 and C11
Can CSS capture a value change - e.g. when the Total Amount goes form $10.00 TO -$5.00 ( minus value)?
If it can, can you give some code or hints?
If it can't it probably will take javascript?
Thanks,
Ron
Using NT 14.21 and C11
Can CSS capture a value change - e.g. when the Total Amount goes form $10.00 TO -$5.00 ( minus value)?
If it can, can you give some code or hints?
If it can't it probably will take javascript?
Thanks,
Ron
24
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by rjolda on May 28, 2025, 12:47:58 PM »Hi,
If your Memory Form IS the Update itself, then there probably won't be any GotFocusBack since it will still be in focus (never lost focus). I might attempt a memory form with the variable and GP TO ANOTHER PROCEDURE which actually does the insert the form. WHen the form is completed and the record inserted, "the program" returns to the Memory Form itself - then the GotFocusBack should trigger and you can update your variable.
Ron
If your Memory Form IS the Update itself, then there probably won't be any GotFocusBack since it will still be in focus (never lost focus). I might attempt a memory form with the variable and GP TO ANOTHER PROCEDURE which actually does the insert the form. WHen the form is completed and the record inserted, "the program" returns to the Memory Form itself - then the GotFocusBack should trigger and you can update your variable.
Ron
25
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by osquiabro on May 28, 2025, 02:39:13 AM »Is it possible for you to create an example?
26
Web Server - Ask For Help / Re: Api endpoint stream - how?
« Last post by Niels Larsen on May 26, 2025, 11:27:34 PM »Hi Bruce
I followed your advice to play with example 40 "ServeDocument" and it's just perfect - works exactly as it should.
Thanks!
I followed your advice to play with example 40 "ServeDocument" and it's just perfect - works exactly as it should.
Thanks!
27
Web Server - Ask For Help / Re: Api endpoint stream - how?
« Last post by Niels Larsen on May 22, 2025, 11:58:44 PM »Thanks for all your input.
Now I have a bit to work with.
I can see that in my case it is by far the easiest to use BASE64 encoded.
Now I have a bit to work with.
I can see that in my case it is by far the easiest to use BASE64 encoded.
28
Web Server - Ask For Help / Re: Api endpoint stream - how?
« Last post by Bruce on May 22, 2025, 07:01:32 PM »Hi Niels,
>> I have some static ftp files that I need to expose via a REST api.
are you over thinking this?
It sounds to me like you just put the static file in the web folder (or sub folder), then the client can just GET it (ie use a regular WebClient to Fetch the file.)
I'm not sure this needs to be in an API?
But assuming it does need to be an API;
Add a StringTheory object to the RETURNS tab of the API.
Put your file in there (probably Base64 encoded.)
>> I'm aware that I can BASE64 encode them but the client would prefer them as "files".
Hence my suggestion above that this is just a regular GET.
If you want more control, then check out the FileDownload (40) example. That has a generic "ServeDocument" procedure in the app for serving files.
An API method will return a JSON or XML response - and of course any binary in there would need to be appropriately encoded at the very least for Json or XML.
I recommend Base64 because that's easier.
Cheers
Bruce
Cheers
Bruce
>> I have some static ftp files that I need to expose via a REST api.
are you over thinking this?
It sounds to me like you just put the static file in the web folder (or sub folder), then the client can just GET it (ie use a regular WebClient to Fetch the file.)
I'm not sure this needs to be in an API?
But assuming it does need to be an API;
Add a StringTheory object to the RETURNS tab of the API.
Put your file in there (probably Base64 encoded.)
>> I'm aware that I can BASE64 encode them but the client would prefer them as "files".
Hence my suggestion above that this is just a regular GET.
If you want more control, then check out the FileDownload (40) example. That has a generic "ServeDocument" procedure in the app for serving files.
An API method will return a JSON or XML response - and of course any binary in there would need to be appropriately encoded at the very least for Json or XML.
I recommend Base64 because that's easier.
Cheers
Bruce
Cheers
Bruce
29
Web Server - Ask For Help / Re: Refresh NWB Header
« Last post by rupertvz on May 22, 2025, 01:22:22 PM »Thank you Osquiabro,
I've tried what you've suggested, but the memory-form does not seem to get focus - after a record is added in the NWB under the memory-form.
Thus GotFocusBack embed is not firing. Any ideas?
I've tried what you've suggested, but the memory-form does not seem to get focus - after a record is added in the NWB under the memory-form.
Thus GotFocusBack embed is not firing. Any ideas?
30
Web Server - Ask For Help / Re: Hide Webcam after photo is taken - SOLVED
« Last post by rjolda on May 22, 2025, 07:45:05 AM »HI
With Bruce's help I found out that the TakePicture button is dedicated to javascript which runs and WILL NOT SEND a value to the server.
By putting the hide condition and then the refresh fields in the WEBCAM field! That was the trick.
Ron
With Bruce's help I found out that the TakePicture button is dedicated to javascript which runs and WILL NOT SEND a value to the server.
By putting the hide condition and then the refresh fields in the WEBCAM field! That was the trick.
Ron