Auto scroll down scroll bar

Hi,

I have this asp.net chat page using anthem.net ajax framework. Whatever the users enter, the chat text appears in a label control place inside a div tag with overflow set to auto. I want the scroll bar to scroll down automatically. Or make the scroll bar in the down position all the time. How can I do this?

 

<div style="OVERFLOW:auto; WIDTH:550px; HEIGHT:550px">
     <anthem:Label id="LblChatText" runat="server" Width="540" Height="540"></anthem:Label>
</div>
  

Thanks. 

0
new2aspdotnet
5/14/2007 11:20:48 PM
asp.net.client-side 24353 articles. 1 followers. Follow

7 Replies
944 Views

Similar Articles

[PageSpeed] 32

Props to Eric Pascarello for figuring this out:

http://radio.javaranch.com/pascarello/2006/08/17/1155837038219.html

Hope this helps!  Don't forget to mark the most helpful post(s) as Answer for the sake of future readers.  Thanks!


Josh Stodola ← Come check out my blog!
0
JoshStodola
5/15/2007 1:12:30 PM
It doesn't work. It works the first time when you visit the chatroom,
the scroll bar is at the down position. I update the chat text every 5
secs. And everytime I scroll down, the scroll bar goes back up at the 5
sec interval. 
0
new2aspdotnet
5/15/2007 8:57:10 PM

Trust me, it does work....

After you update it (body onload), tell it to scroll down again:

    objDiv.scrollTop = objDiv.scrollHeight;
Hope this helps!
Josh Stodola ← Come check out my blog!
0
JoshStodola
5/15/2007 8:58:14 PM
Yes, earlier I did not try it out on my project. I read the article and
it looked it just what I wanted. Now I am working on it, the scroll
down doesn't work.
0
new2aspdotnet
5/15/2007 9:05:07 PM

Well, then you (of all people) should know that you have something wrong.  There is a live example on the page I showed you that proves it works.  If you can't get it to work, then you have a problem.  Next time dont say, "it doesn't work" but rather "I am having problems with this...." or "I get an error when I try that code..."

Now that you know you have screwed something up, it is your job to dig and find the source of the problem.  Are you getting any javascript errors?  Any unexpected behavior?  Any unique situation that differs your project from Eric's example?

I certainly do not have a crystal ball, and I only have 5 senses.  So, telling me "it doesnt work" will get you no where.  Please try to find the source of the problem, explain it here, and then I can help you get it working for your scenario.

Sorry if I was a bit harsh, but these kinds of things really annoy me...


Josh Stodola ← Come check out my blog!
0
JoshStodola
5/15/2007 9:11:30 PM

It doesn't work :-) I am sorry about that.

I don't think I have done anything wrong. I am not doing something right. I dont know what it is. I am not having any problem or get any error or unexpected behaviour or javascript error. Like I mentioned earlier, it works the first time when I visit the chatroom, the scroll bar is at the down position. I update the chat text every 5 secs. And everytime I scroll down, the scroll bar goes back up at the 5 sec interval.

Must have stressed on this thing, I am using Anthem.Net Ajax framework. I believe something must be done differently because of async callbacks that happen in the background. It works fine the fine time I visit the page, but not during subsequent chattext updates that happen during the callback every 5 secs.

0
new2aspdotnet
5/15/2007 10:32:41 PM

Show me the code that updates the textbox.  Chances are you will just have to execute one line of javascript immediately after the update (as I already pointed out).


Josh Stodola ← Come check out my blog!
0
JoshStodola
5/16/2007 7:54:31 PM
Reply:

Similar Artilces:

Scrolling Scrolling Scrolling
Name: Naseef Fatemi Email: ishwaadatyahoodotcom Product: Firefox Summary: Scrolling Scrolling Scrolling Comments: Guys firefox is one of the best EVER piece of software out there but I have a problem. The scrolling in firefox is terrible compared to the smooth and fluent scrolling of opera, and thats with smooth scrolling option in firefox activated. So guys am i missing something hidden and if not can you guys work on it cause its going to make firefox even better than it already is. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090...

Scrolling, Scrolling and more Scrolling
I've spent several weeks fixing scrolling and zooming bugs on b2g. You may have enjoyed bug 831973 (and it's duplicates) over the last week. In bug 811950 it took -9 lines to introduce the bug and a further -27 lines to fix it. Perhaps we have too much scrolling code: * AsyncPanZoomController.cpp * BrowserElementScrolling.js * PanZoomController.java * nsFrameLoader.cpp There is a fair amount of duplication here. Ideally we should have a single async implementation with a good set of tests. Removing the duplication is going to require some collaboration. Are there o...

how to scroll header of datagrid when scroll up or scroll down ?
say suppose i am show 200 records through my datagrid and i don't want to do paging. if i am going to see all the records then i have to scroll up or scroll down. so i want that at the time of scroll up or scroll down my header portion of datagrid will scroll up or scroll down. please help me to do it. if it is possible then please give me the sample code. ...

Possible to turn off explorer scroll bar but allow div scroll bar?
I was just trying to find out if I can disble the vertical scroll bar for the pages but allow vertical scroll bars for a DIV?Best Regards,~Chris In other words disable IE scroll bars but allow DIV scroll bars?I keep running into problems with controls creating useless scroll space in explorer to display nothing.Best Regards,~Chris Unfortunately a DIV does not use % on the height similiar to width of a page.Would be nice for handling varying screen resolutions.Best Regards,~Chris...

Scroll bar without need for scrolling?
Name: Vineeth Ajayan Kuruvath Email: vineethdotkuruvathatgmaildotcom Product: Firefox Summary: Scroll bar without need for scrolling? Comments: The right side scroll bar does not disappear when it is not needed Browser Details: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

Small scroll bars in Scroll box
Hi everybody, I've migrated my code from XE3 to XE4. i found that there is no published property to show small scroll bars in Vertical scroll box (TFramedVertScrollBox). Does anybody has any idea, how we can show that. Regards, Padam Jain ...

PB8
i have the problem on some XP-workstations, that my PowerBuilder-8-Application shows no H-Scroll-Bar and V-Scroll-Bar. Unfortunately, this problem could not make well after the upgrade of the Runtime-Dll's (new version of runtime-Dll's is: pb803_9704 localizedruntimes). Thanks and regards Michael IMHO...since about PB 6.5, PB is unable to tell positively that it needs scrollbars. To force them to appear, go back to the window or user object that contains the DW and shrink the space for the DW until the scrollbars appear in the window painter. Then put code in th...

how to scroll header of datagrid when scroll up or scroll down ? #2
say suppose i am show 200 records through my datagrid and i don't want to do paging. if i am going to see all the records then i have to scroll up or scroll down. so i want that at the time of scroll up or scroll down my header portion of datagrid will scroll up or scroll down. please help me to do it. if it is possible then please give me the sample code....

Scroll Vertical using button in the scroll bar.
Scroll Vertical using button in the scroll bar. I'm trying to scroll two DW in sync. It works just fine by using the FristRowOnPage in the ScrollVertical event as long as the user drags the scroll bar itself. The problem is when the user clicks the up or down button on the scroll bar the ScrollVertical event isn't fired. Any suggestions are appreciated. Your assumption is wrong. ScrollVertical event DOES fire when you click up/down arrows on the scrollbar. >The problem is when the user clicks the up or down >button on the scroll bar the ScrollVertical even...

Scroll bar won't scroll
Name: Tom Email: WhiteGirlsownmeataoldotcom Product: Bon Echo Summary: Scroll bar won't scroll Comments: After downloading the release I tried to scroll down a page to no avail. I am now having to use the down arrow key just to go down the page. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Dealio Toolbar 3.1 Firefox/3.0 From URL: http://www.mozilla.org/projects/bonecho/index-2.0a3.html ...

GPF when scrolling with vertical scroll bar in datawindows
We are using PB 5.0 and SQL Server 6.5. When displaying lists (datawindow) on screen there sometimes is a problem when trying to scroll down or up the list. After a couple of movements with the vertical scroll bar in the datawindow, a GPF will occur. The lists sometimes contain nested reports or user-defined functions. We are not using 'retrieve as needed'. Printing of the list datawindow gives no GPF, problems only occur when trying to scroll with the vertical scroll bar in the datawindow. Thanks in advance for your reactions, Ardy The Netherlands Did you ever...

Vertical scrolling bar scrolls DW headers
Hi, While vertical scrolling a dw list for a webform, the headers are being scrolled up and they dissapear as you continue scrolling . Is this intended behaviour of the DW ? Thanks Yes that is expected behavior. We are working on an implementation that would allow the header to remain at the top of the page while scrolling the data but there is no schedule yet for when that will be implemented. Regards, Dave Fish Sybase On 22 Nov 2005 04:32:10 -0800, "Nestor" <nesfree@hotmail.com> wrote: >Hi, >While vertical scrolling a dw list for a webfo...

Scroll bar on left hand side and browser bar supposedly not functioning properly
Name: Hikari Product: Firefox Release Candidate Summary: Scroll bar on left hand side and browser bar supposedly not functioning properly Comments: I was unable to go to any website when I typed a url into the browser bar and pressed enter (or any of the buttons nearby). The only way I could browse the internet was by using google and then clicking my way through the page. And finally the scroll bar is on the left hand side and there seems no way to change it to the right hand side. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Fi...

Changing field names (display name) for a web interface and how to create a scroll bar for a datagrid or any control with a scroll bar to display data
Hello,  Can any1 please help me. i was wondering if any1 can tell  me how i can change  field names for a data grid only for the display on the web interface and also how can i put scroll bars on my data grid. Thank you.       Hi misbahmurtza, You can set field names in HeaderText attribute in any column or template. If you want to create a scroll bar, the easiest way is to set style for the <div> which contains your datagrid. Here is a sample: <div style="vertical-align: top; height:100px; width:100%; overflow:auto;"> Make sure ...

Web resources about - Auto scroll down scroll bar - asp.net.client-side

Scroll - Wikipedia, the free encyclopedia
The Joshua Roll , Vatican Library . An illuminated scroll, probably of the 10th century, created in the Byzantine empire. A scroll is usually ...

Users Of Facebook’s Android App Can Scroll Through Multiple Open Graph Actions In Posts
Users of Facebook’s Android application are seeing a new way to browse content created by Open Graph actions generated by their friends’ app ...


Facebook Testing Home Page Design That Keeps Ads and Bookmarks Visible as You Scroll
Facebook is testing a new home page design that allows the news feed to be scrolled independently of the rest of the page. This allows ads, app ...

scroll kit (@scrollkit) on Twitter
Name.com @ namedotcom Name.com @ namedotcom

Letter Scroll on the App Store on iTunes
Get Letter Scroll on the App Store. See screenshots and ratings, and read customer reviews.

Violin scroll with music - Flickr - Photo Sharing!
Explore Photo Phiend's photos on Flickr. Photo Phiend has uploaded 5480 photos to Flickr.

The Elder Scrolls Online: Tamriel Unlimited - Bethesda E3 Showcase Trailer - YouTube
"Presented by Game Director Matt Firor, get a sneak first look at exciting new changes for The Elder Scrolls Online - Tamriel Unlimited. For ...

Cracking open Elder Scrolls Online
Fans may now register for the Elder Scrolls Online closed beta, and to mark the occasion DexX was granted an exclusive interview with Creative ...

Scroll in for a sweet treat
FORGET ice cream scoops — the coolest way to eat our favourite summer treat is scrolled to order.

Resources last updated: 1/17/2016 1:15:41 AM