scroll posititon for div but different problem (timer is there)
-
I have developed a chat application. i am displaying chat messages using gridview in a div.I am using gridview in update panel(ajax).With every timer_tick I update the gridview.My timer control s in control template of update panel.The problem is I have to maintain the scroll position after after timer tick event ie after the grid gets the data. I ahve altried all the options on the net.None of them is working.Help me Its urgent. This problem is buggin me alot. Here is the code .aspx ]]> Welcome to chat application <%----%>
]]>
<%-- --%> <%#Eval("Chat_msgs")%>
-
I have developed a chat application. i am displaying chat messages using gridview in a div.I am using gridview in update panel(ajax).With every timer_tick I update the gridview.My timer control s in control template of update panel.The problem is I have to maintain the scroll position after after timer tick event ie after the grid gets the data. I ahve altried all the options on the net.None of them is working.Help me Its urgent. This problem is buggin me alot. Here is the code .aspx ]]> Welcome to chat application <%----%>
]]>
<%-- --%> <%#Eval("Chat_msgs")%>
Use this javascript code after the databind or just before the closing body tage. var objDiv = document.getElementById("div1"); objDiv.scrollTop = objDiv.scrollHeight; Use the original 'div id' in place of div1.
The miracle is this--the more we share, the more we have.
-
Use this javascript code after the databind or just before the closing body tage. var objDiv = document.getElementById("div1"); objDiv.scrollTop = objDiv.scrollHeight; Use the original 'div id' in place of div1.
The miracle is this--the more we share, the more we have.
hey gaurav thanks for reply i was waiting for a reply no body replied i guess its not such atough question anywaz your solution is not working any other solutions. i am fed up this problem hopefuly some one can give a solution(s) thanks in adavnce
-
hey gaurav thanks for reply i was waiting for a reply no body replied i guess its not such atough question anywaz your solution is not working any other solutions. i am fed up this problem hopefuly some one can give a solution(s) thanks in adavnce
oh... It should work...Because it is tested in my porject. For creating a scroll i used style="overflow:auto" in my div...
Try it again...
The miracle is this--the more we share, the more we have.
-
oh... It should work...Because it is tested in my porject. For creating a scroll i used style="overflow:auto" in my div...
Try it again...
The miracle is this--the more we share, the more we have.
hey gaurav believe me its not working i tried it ..(many times now) my chat messages are going down i have drag the vertical scroll bar down to see the messages the scroll position does not remain at the same position after the timer_tick in update panel fires.... waiting for your reply Thanks in advance
-
hey gaurav believe me its not working i tried it ..(many times now) my chat messages are going down i have drag the vertical scroll bar down to see the messages the scroll position does not remain at the same position after the timer_tick in update panel fires.... waiting for your reply Thanks in advance
also sorry to disturb u alot u can try my code which i have given in first post thanks in advance tc