SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member netwalkman's Avatar
    Join Date
    Aug 2003
    Location
    Hefei,China
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to scroll a div with overflow auto using javascript?

    Something like this:
    http://www.domedia.org/oveklykken/css-div-scroll.php

    I would like to scroll the content in the <div> to the bottom with javascript? But failed after some steps trying to use obj.style.clip.

    Can someone help me? Thanks.

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    england
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    to be honest, I've never done what you're asking before, so not going to be a lot of help! sorry!

    However, if you go to www.amazing-grades.com, and look at their front page, in the "news feeds" area for e.g., I think this is an example of what you're wanting (could be wrong), so if it is, view source, and take a look at how they do it.

    sorry I can't be more help

  3. #3
    SitePoint Member netwalkman's Avatar
    Join Date
    Aug 2003
    Location
    Hefei,China
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    spud_nic,thanks a lot.You are very kind.
    I've taken a look at the page you mentioned.Unfortunately it's not exactly what I want. I've decided to use <iframe> to replace my <div> because calling frameObject.contentWindow.scrollTo() is more natural and easily understood.There seems no existing api to do such job for <div> object in mozilla,although for IE I can use things like doScroll() .
    Anyhow,thanks for your information


Bookmarks

Posting Permissions

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