473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How can i auto scroll down a css iframe ? (overflow:auto;)

Hi everyone..!! i have a chat and i want all the new messages to be seen but ecause i have a css iframe i would like to auto scroll down. so i can see the new message instead of click the scroller and scroll down.. it takes time . and i dont really like that idea.. Does some one knows how to do that ?

tachiracompras.com/chat/ see the actual chat.
Dec 9 '07 #1
2 12868
drhowarddrfine
7,435 Expert 4TB
html/css cannot do this
Dec 9 '07 #2
You can do it pretty easily with javascript, nothing fancy:

<script type="text/javascript">
document.getElementById("chatWindowId").scrollTop= 500;
</script>

Just replace chatWindowId with the actual id of you chat window. The element has to be scrollable (overflow-y: auto;). 500 is what I found useful for me, if you want to scroll more, chose one value that suits you. Check also the online documentation for scrollTop, to learn more.
Aug 29 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Andrew Fedoniouk | last post by:
I have a simple test document which produce the following in Mozilla and Opera: http://terrainformatica.com/w3/p2/problem1.png Internet Explorer behaves as per recommendation (I guess) Did I...
1
by: Marek Mänd | last post by:
<select multiple style="height:200px;"> <option>a <option>b </select> Why does Mozilla draw the vertical scrollbar to the SELECT html element? There is plenty of void room below two OPTIONs in...
4
by: Harry | last post by:
I just implemented an "overflow: auto" for a div in the main message window: http://www.auriance.com/docs/interaction/ This works as expected in Internet Explorer and Opera, but in Firefox it...
1
by: yellowtek | last post by:
Hi, I display some information (actually a table of data) within a <div> which height is constrained, making display a vertical scrollbar: <div style='overflow: auto height:300px;'> I need to...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
2
by: kaczmar2 | last post by:
I have a webpage that has 2 main DIVs - a title div and a content div. I want the title dive to always "stick to the top of the page and not scroll, regardless of the size of the window. The...
5
by: vunet.us | last post by:
How can I hide scrollbars which appear in my floating div element with CSS property overflow:auto? I do need to use auto overflow. Thank you.
1
by: Jake Barnes | last post by:
I searched comp.lang.javascript on Google Groups but I didn't find an answer when I searched for "viewport" or "viewport div" or any combination of words using "viewport" so now I think I'm...
1
by: gsuns82 | last post by:
Hi all, I have a problem in creating scroll bar. consider my following css class code for a <Div> tag: ------------------------------------------------------------------------------...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.