In my HTMl file, I am trying to populate a span text zone with some voice-recognized text. I am struggling with one thing here:
Auto-scroll on the span zone:
<span id="final_span" class="final"></span>
Javascript code:
var final_span = document.getElementById("final_span");
finalDiv.innerHTML += ' ' + data + '<p>';
finalDiv.scrollTop = finalDiv.scrollHeight;
The data inside the JavaScript keeps increasing, but when it exceeds the span limit, a scroll bar on the right appears because of the CSS code I wrote: overflow-y: scroll;
I would like to build it as auto-scroll until the bottom when text exceeds.
Thanks for your time.