Jump to content


Photo

Ajax chat issues.


  • Please log in to reply
22 replies to this topic

#21 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 29 September 2006 - 12:36 AM

Yea the scrollCheck functon is junk..lol Well at least in it's present state. I have also been thinking maybe I can have a onmousemove envent in the chatBox div. Then if the user has scrolled up I would not set the scrollTop to the scollHeight untill they scroll down.

Any suggestions or suggested reading?

Thanks,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#22 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 29 September 2006 - 02:12 AM

You might try the javascript board on webdevelopers.com/forums.  That's where I usually head for JS help.

Info: PHP Manual


#23 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 05 October 2006 - 08:31 AM

I got side tracked for a few days. Been working on converting my large template libary to xhtml and css compliant. Realitvely easy but very time consumming.

I did have the time to fix the scroll check function..

here is the fix:

function scrollCheck() {
   var chatBox = document.getElementById('chatBox');
   var top = chatBox.scrollTop;
   var height = chatBox.scrollHeight - 150;
   
   var returnText;
   //for some reason in IE when you subtract the 150(the size of the box)
   //when there are no messages the out put is -86 and in FF or Opera it is 0
   if ((top == height) || (height < 20)) {
       return true;
   } else {
       return false;
   }
}

Thanks for your suggestions,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users