I have a HTML table and its fields are automatically filled by a external application (sensor datas from a Labview application) and they change their value every 700 ms. I want to get these values and manipulate them (inserting in a database, or some math operations). I've tried to use Javascript "getElementById" with "onchange" and "oninput" event and it didn't work.
Example of HTML field:
<td><input type='number' class='numeric' id='pressao1' oninput="getCurrentValue()" disabled ></td>
The field must be disabled, because I just want to exhibit.
The Javascript code is very simple:
<script>
function getCurrentValue(){
var teste = document.getElementById("pressao1").value
document.getElementById("demo").innerHTML = "Valor capturado de pressão 1: " + teste;
}
</script>
And I put just a
element to test if I got the value and its change:
<p id="demo"></p>
I'm thinking to use an autorefresh with a timer, but I guess I will lose some value and its not a clever solution.
Something like this:
<meta http-equiv="refresh" content="0.7; URL=XXXX">
If there is any solution with PHP, instead of Javascript, it's ok too.
Thanks in advance.