scroll - Update html container with Javascript - Strange issue -


I have a JavaScript function that has been removed by a JavaScript timer.

Every time the timer fires, I need to add an HTML string to the container that is & amp; Display HTML on screen

The more container is added, the container scrolls down.

My problem is that HTML stops appearing after some time, even if alert pops up with the right value.

Am I applying it incorrectly or am I using wrong control to do this?

I am using ASP.Net; C #.

Here is the code that I am using to find and enter the html in the div (the message function has an input parameter):

  var lbl = document GetElementById ('lblMesssage'); Lbl.inner HTML + = '& lt; Div & gt; & Lt; B & gt; & Lt; Span style = "color: red;" & Gt; Message: & lt; / Span & gt; & Lt; / B & gt; & Lt; Br / & gt; + Message + '& lt; Hour / & gt; & Lt; / Div & gt; '; Warning ('message:' message); Lbl.scrollTop = lbl.scrollHeight;  

Here is the HTML for the div:

  & lt; Div id = "lblMesssage" style = "overflow: scroll; boundary: solid 1px # 3333FF; width: 98%; height: 100%;" & gt; & Lt; / Div & gt;  

Thanks for the help.


Comments