Hi all,
I am trying to draw a dynamic progress bar according to a dynamic value. The data comes from ethernet port like that "%! data" . I can write this value on the html page. But when i try to draw a progress bar according to this value it doesnt work. my code is below. Can you help me please?
Code:
<p id="demo">%! port-adc2</p>
<script>
document.getElementById("demo").innerHTML="%! port-adc2";
</script>
<progress id="progressBar" value="0" max="100" style="width:300px;"></progress>
<span id="status"></span>
<h1 id="finalMessage"></h1>
<script type="text/javascript" language="javascript">
document.getElementById("demo").innerHTML="%! port-adc2";
function progressBarSim(demo) {
  var bar = document.getElementById('progressBar');
  var status = document.getElementById('status');
  status.innerHTML = document.getElementById("demo").innerHTML="%! port-adc2";
  bar.value = document.getElementById("demo").innerHTML="%! port-adc2";
  
	var sim = setTimeout("progressBarSim(" demo ")",10);
}
var amountLoaded = 0;
progressBarSim(amountLoaded);
</script>