Member Panel


Sponsors and Ads

Live Tag Cloud

PC Forum PC Help Forum » Web & Networking » Web Design » overflow: auto;

Web Design - overflow: auto; posted in the Web & Networking forums; I have got this chat script that is run from a flatfile, so there is no DB quesries, what i want it to do is automatically scroll to the last ...

JOIN US NOW to remove these Ads

PC Help Forum, the number one FREE computer support website in the search engines
Post New Thread  Reply
  #1  
Old 02-16-2007
spellbyte's Avatar
Elite Member
My PC
 
Join Date: Nov 2004
Location: Top Secret... really
Posts: 527
spellbyte - See this Members User comments on their Profile page
Send a message via MSN to spellbyte Send a message via Skype™ to spellbyte
Default overflow: auto;

I have got this chat script that is run from a flatfile, so there is no DB quesries, what i want it to do is automatically scroll to the last post that has been made, I have currently got it setup like this

Code:
<div style="height:100px; overflow: auto;">
<table summary="" border="1" width=100%>
 <tr>
  <td><p align="left"><?php include("messages.txt"); ?></p>
   
   
  </td>
 </tr>
</table>
</div>
but it isn't auto scrolling, the sc roll bar is there but it just sits at the top of the list

any thoughts please


  #2  
Old 02-17-2007
upgrader's Avatar
Site Manager
My PC
 
Join Date: Jul 2006
Location: C:\ UK
Posts: 6,223
PC Experience: Some Experience
upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page
Send a message via MSN to upgrader Send a message via Skype™ to upgrader
Default

Im not a web expert but i have Pmed a member of our tech team for you.

Chris


__________________
PCHF Rules--PCHF Prework--PCHF Downloads
  #3  
Old 02-17-2007
madmonkey's Avatar
Site Manager
My PC
 
Join Date: Oct 2006
Location: South Wales
Posts: 5,439
PC Experience: PC Basket Ball Head!
madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page
Default

hey spellbyte,

You'll need a text area, but you will need to create this within your messages. For example:

<textarea rows="2" name="Msg" cols="40">My Messages</textarea>


__________________

Free Links: Hit Counter.. - ..Form Mail.. - ..Games.. - ..Smiley's.. - ..Psychometrics Online.. - ..myFavorites Homepage
Submit your URL or Blog to: cyberJuice USA / UK online shopping links and blogs.
  #4  
Old 02-20-2007
spellbyte's Avatar
Elite Member
My PC
 
Join Date: Nov 2004
Location: Top Secret... really
Posts: 527
spellbyte - See this Members User comments on their Profile page
Send a message via MSN to spellbyte Send a message via Skype™ to spellbyte
Default

that worked gr8 thanks madmonkey, One last problem with it though, when i submit message it always goes to the top of the textarea, what i want it to do is auto scroll to the last post

any ideas?


  #5  
Old 02-20-2007
madmonkey's Avatar
Site Manager
My PC
 
Join Date: Oct 2006
Location: South Wales
Posts: 5,439
PC Experience: PC Basket Ball Head!
madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page
Default

- In that case you will need to use the following code instead:

<textarea name="txtArea" rows="2" name="Msg" cols="40">My Messages</textarea>


- In the header (<head>) of your document, use the following code:

<script type="text/javascript">
function scrollToEnd (element) {
if (typeof element.scrollTop != 'undefined' && typeof element.scrollHeight != 'undefined') { element.scrollTop = element.scrollHeight; }
}
</script>


- At the end of the body (</body>) of the document, use the following code:

<script type="text/javascript">
ScrollToEnd(txtArea);
</script>


__________________

Free Links: Hit Counter.. - ..Form Mail.. - ..Games.. - ..Smiley's.. - ..Psychometrics Online.. - ..myFavorites Homepage
Submit your URL or Blog to: cyberJuice USA / UK online shopping links and blogs.
  #6  
Old 02-21-2007
spellbyte's Avatar
Elite Member
My PC
 
Join Date: Nov 2004
Location: Top Secret... really
Posts: 527
spellbyte - See this Members User comments on their Profile page
Send a message via MSN to spellbyte Send a message via Skype™ to spellbyte
Default

thanks for the reply MadMonkey but it's still not working

I placed the <script> into my header file and the <textarea> into my chat.php, but still nothing, i even tried putting the script into my chat.php but again still doesn't auto scroll to the bottom



Reply
New! Norton Internet Security 2008 – Download Now Click Here

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT +1. The time now is 02:32 PM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC7
All Graphics & Content Copyright © 2004-2008 - PC Help Forum.com


Back to Top