Skip to content
Loading
  • 0
    what you are doing for

    onload="scroll_to_bottom();" 
    0
  • 0
    put the chat window in div tag and apply scroll bar on div with its position at bottom
    0
  • 0
       function scroll_to_bottom() {
                var objDiv = document.getElementById("divExample");
                objDiv.scrollTop = objDiv.scrollHeight;
            }
    0
  • 0
    can you share screen shot of your issue?
    0
  • 0
    need to place scrollbar at bottom in
    0
  • 0
    C#
    try this.....
    
    script type="text/javascript">
     window.onload = function () {
     var strCook = document.cookie;
     if (strCook.indexOf("!~") != 0) {
     var intS = strCook.indexOf("!~");
     var intE = strCook.indexOf("~!");
     var strPos = strCook.substring(intS + 2, intE);
     document.getElementById("grdWithScroll").scrollTop = strPos;
     }
     }
     function SetDivPosition() {
     var intY = document.getElementById("grdWithScroll").scrollTop;
     document.cookie = "yPos=!~" + intY + "~!";
     }
     script>
    
    
    
    
    div id="grdWithScroll" …………  onscroll="SetDivPosition()">
    0
  • 0
    hi....i am adding scrollbar to chat window..I am displaying messages in ascending order(recent message at bottom)..at one instance scroll bar will be generated as per messages....at evry time scroll bar should point recent message...recent message is at bottom...so we need to place scrollbar as bottom
    0