NetTalk Central

Show Posts

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.


Messages - oggy

Pages: [1] 2 3 ... 15
1
If it is not fixed, this is how I solved this:
 strUcitaj.Remove('file:///') ! remove /// if some emoji is embeded
 strUcitaj.Remove('file://') ! remove // if some image is embeded
 strUcitaj.Replace('%20',' ',0,0)  ! remove blank if the image is in folder with spaces

2
Web Server - Ask For Help / Re: Starting Clarion proc from javascript
« on: July 15, 2020, 04:09:31 AM »
Hi,Bill.
couple of questions, of course I had it ,
$.get('YourFunc.json?YoucanpassURLparamaters=1',function(data){


On this part, where in getting function I can read that parameter, and second question, sending more than one parameter is possible?
EDIT BY STUPID ME: never mind, got it...

3
Web Server - Ask For Help / Re: Starting Clarion proc from javascript
« on: July 14, 2020, 11:16:57 PM »
Thanks Bill and Bruce. I just started to learn javascript, this is the code I found deep in internet ocean.
Thanks for advice.
Going to try to.
Of course, I know that the timer event is not smooth as some other event, this is just first step to get what I want.
I succeed to get some variable right from the javascript (this is all about one of my previous post), so now will try to do some action when variables change.

Thanks...

4
Web Server - Ask For Help / Starting Clarion proc from javascript
« on: July 14, 2020, 12:34:53 PM »
In javascript, i need to do some clarion code
I set a timer for the webform,  and now on timer must do clarion code or call simple clarion functin...

<script>
var interval = 500; // ms, primjer: 1000 ms = 1 sekunda
var expected = Date.now() + interval;
setTimeout(step, interval);
function step() {
    var dt = Date.now() - expected;
    if (dt > interval) {
    }
do someroutine  // POINT WHERE I WANT TO START SOME CLARION CODE
    expected += interval;
    setTimeout(step, Math.max(0, interval - dt));
}
</script>

How?
Regards.

5
Web Server - Ask For Help / Re: Action on host value change
« on: July 09, 2020, 11:14:58 PM »
Of course, we are on the same spot now ;)
I started to learn javascript some time ago, but because of lack of time, and undergoing projects, still on the "page one"...


6
Web Server - Ask For Help / Re: Action on host value change
« on: July 09, 2020, 04:53:21 AM »
I do not know, because I do not know where to put on client side.. .I try to put in every embed in the form, in all the host value embed, and everywhere, but no gain for now.

7
Web Server - Ask For Help / Re: Action on host value change
« on: July 09, 2020, 03:39:11 AM »
I do not want to teach me how to "create pdf", i need some advise, if is possible or not...
In form I watching host values, for now I add group with couple of fields:
Watched         GROUP,PRE(ww)
heartbeat         STRING(255)
Pressure_1        STRING(255)
Pressure_2        STRING(255)
O_level           STRING(255)
N_level           STRING(255)
X_level_a         STRING(255)
X_level_b         STRING(255)
Y_level_a         STRING(255)
Y_level_b         STRING(255)
                END

In form, in generateform, after <form> embed:

p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:heartbeat') , 'ww:heartbeat')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:Pressure_1') , 'ww:Pressure_1')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:Pressure_2') , 'ww:Pressure_2')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:O_level') , 'ww:O_level')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:N_level') , 'ww:N_level')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:X_level_a') , 'ww:X_level_a')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:X_level_b') , 'ww:X_level_b')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:Y_level_a') , 'ww:Y_level_a')
p_web.ntWatch(loc:formname,'hostvalue', '#' & p_web.nocolon('ww:Y_level_b') , 'ww:Y_level_b')

Those host values is already populated on the form, all works well.
Now, when on server side, the value Heartbeat is changed, or any other values, I "pushed" it to all clients:

 s_Web.SHV('ww:heartbeat',Heartbeat,0)
 s_Web.SHV('ww:Pressure_1',Pressure_1,0)
 s_Web.SHV('ww:Pressure_2',Pressure_2,0).... and so on...
ok, the clients see the new values...

And now, when client(s) got the changed values... I need to start AlarmIt() procedure, for example, or simply on site do:
 loc:alert = 'The value of ....'&p_web.ghv('ww:heartbeat')&', is changed...!'
do SendMessage
This is the part I cannot accomplish, I need to "trap" host value changes...


8
Web Server - Ask For Help / Re: Action on host value change
« on: July 09, 2020, 03:04:47 AM »
Ok, this new procedure alarmit, is on work now. I just say it will be used for example, PDF. Maybe it will be to send some email... For now, its only in development...
my main issue is how, if possible, and when, I can "read" host value and if the value is changed, or created, to start some code...

9
Web Server - Ask For Help / Re: Action on host value change
« on: July 08, 2020, 05:16:44 AM »
I must explain what I am going for.
On site 1, local hospital/ambulance, some medical instruments sends data to web server/SQL database. This is working part. I use Nettalk and simpleserver to get data from that instruments. So far, so good.
This is working without problems for almost a year now. Now, the users want to watch, see, actual data and on some condition to automatically do another task, for example, create PDF file, but on the client side, far from site 1.
There is 7 users, for now, that will be using that new function. Every user will log onto web site, already done with Nettalk, and after logging, if some new data is on site 1/ server side, I need to "push" that data to lets say channel-hosts and after receiving on remote sites, to create PDF document.... With hosts value I got it on remote sites, I can display that new data, but the part I do not know how to do it, is how to start AlarmIt procedure, where I will create PDF documents, and do some other tasks, when hosts values changes...

10
Web Server - Ask For Help / Re: Action on host value change
« on: July 08, 2020, 04:30:48 AM »
Hi Bruce,
my java skills is almost, be honest, none  :)


11
Web Server - Ask For Help / Re: Action on host value change
« on: July 08, 2020, 04:02:00 AM »
Thanks for answer.
But hehehe . I do already did that, my question is, when server "push" new value via websocket-host value, in the form where I am watching host value, how to start some new action, in my example AlarmIt procedure?
Regards,

12
Web Server - Ask For Help / Re: Action on host value change
« on: July 07, 2020, 11:19:19 PM »
Hm, understood.
Let me ask another question.
In web form, there is no timer event, from where I can send request to server side to check some values...
Or it is?

13
Web Server - Ask For Help / Action on host value change
« on: July 07, 2020, 01:58:34 AM »
Nettalk 11.
I have form in where I watching host values.
The fields to show host values is already on the form. On changes in host values, how and where to put the code to do some another codes?
For example:
If p_web.GHV('Pressure1') > 150 and p_web.GHV('HeartBeat') > 100
 AlarmIt() ! calling another procedure
end
In theory this will work, but where in form to put that code?
Regards...

14
OK, i managed to resolve this...

BTW, Bruce, nice work on new build. After installing 1138 build of Nettalk, I did not get any error while compiling. I mean on error of unresolved externals...
Regards...

15
Assuming HL7 can communicate via socket, the answer is yes, simpleserver from Nettalk will do it...

Pages: [1] 2 3 ... 15