Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    545
    Thanks
    81
    Thanked 5 Times in 5 Posts

    Auto-scrolling with dynamic data

    I'm using this div container on my web page to display data in:

    PHP Code:
    <div id="id_screen_area" style="border:1px solid black; width:400px; height:100%; overflow:scroll; overflow-y:scroll; overflow-x:hidden;"
    I'm bringing the data in via Ajax (through the "ajax data tunnel") and as the data comes into the div container, it scrolls the page up as the data fills the web page. This works very nicely in Firefox and Windows Safari but not in IE8.

    Here is the Ajax portion that populates the div as the data comes into the browser from the server:

    PHP Code:
    function returnAjaxSendTextMessage()
    {
      var 
    objDiv document.getElementById('id_screen_area');
      if (
    http.readyState == 4//Finished loading the response
         
    {
           var 
    response http.responseText;
           
    document.getElementById("id_screen_area").innerHTML response;
           
    objDiv.scrollTop objDiv.scrollHeight;
         }

    I was wondering if anyone knows a trick to make it scroll in IE8?

    Thanks for any tips...
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    At a first glance:
    Code:
    overflow:scroll; overflow-y:scroll; overflow-x:hidden
    overflow is the general attribute (both x and y), thus it is illogical to set first the overflow as scroll, then make the overflow-y hidden. Remove the red.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    545
    Thanks
    81
    Thanked 5 Times in 5 Posts
    @kor

    I removed overflow:scroll; per your suggestion but it didn't change the results
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •