ASP.NET Ajax Scroll Issue
Dear book readers and authors:
I have a slight problem with my asp.net application and was wondering if you could help me out, using the fundamentals in this book.
I have an asp.net ajax application which refreshes messages every 7 seconds via a timer control. I have a literal control wrapped in a div tag which grabs new messages from my sql server database via asp.net ajax. Now in IE, everytime the page refreshes, I have a javascript function which allows the scrollbars of the div to be placed all the way at the bottom, so that the user does not have to rescroll down to the bottom of the div every 7 seconds.. The following is the javascript function that does so (it works..)
function ScrollOnRefresh() {
var element = document.getElementById("MessagesDiv");
element.scrollTop = 1000000000;
}
This function will not work in Firefox at all, could someone please help me with the work around for firefox that places the scrollbar all the way to the bottom of the messagesdiv.
thank you,
aspC
|