Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrollbar always at the bottom

Status
Not open for further replies.

biktoryah

Programmer
Mar 14, 2003
9
0
0
PH
anybody can help me? i need a code where the scroll bar appears at the bottom once the window is displayed...thanks

biktoryah
 
You could use a transparent 1pixel x 1pixel gif image with the width set to 110% this will force the horizontal scrollbar to appear regardless of screensize

<img src=&quot;transp.gif&quot; width=&quot;110%&quot; height=&quot;1&quot; alt=&quot;&quot; border=&quot;0&quot; align=&quot;&quot;>
Hope this helps
Regards
Ian
Infinity exists! - I just haven't worked out a way to get there yet.

| |
 
i think u miss understood me...i was pertaining to the vertical scroll bar but onLoad of the window the scroll bar would be focused at the bottom part of the screen..

tnx
biktoryah
 
Sorry for the misunderstanding.
You want to scoll to the bottomj of the page once it has loaded?
Then try putting this just before the body tag in your page

<script language=&quot;javascript&quot;> window.scrollBy(0,1000); </script>

Regards
Ian
Infinity exists! - I just haven't worked out a way to get there yet.

| |
 
Question is why?

Do you want to drive your visitors away for making a site, that is not the norm?

OR what about people who &quot;print&quot; sites up? I do from time to time, so that i have a hard copy of the site and wont have to &quot;trudge&quot; through looking for the information again.
 
WizyWyg,

what i am trying to do is a chat program web-based...i am refreshing the page every 1 second and unfortunately the vertical scroll bar seen at the right hand of the screen is always on top which is a bit of a problem since the screen would post messages one at a time filling up the page and the most recent message would seen at the bottom...this would then result to the message not being read by the person chatting...

Ian,
haven't really tried your code yet..ill get back to you on that one...but thanks a bunch for helping

biktoryah
 
Could you not change the size of the CHAT SCREEN AREA to make it fit or perhapse the frame it is in ??
 
You may want to look at an existing html chat to see how its done, since many i go to Html based do fine with having the scroll bar where it always is, and the newest message posted at the bottom without anyone having to scroll.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top