DHTML Javascript DIV Scroll Sync Script?

Discussion in 'Javascript' started by sravkum@gmail.com, Nov 17, 2006.

  1. Guest

    Hi,

    I have tried many options for this, let me explain ma problem first

    Think that we have got two Layers
    <Div id="layer1"> with some horizontal scrolled content </div>
    <Div id="layer1"> with some horizontal scrolled content (has same
    content as the above) </div>

    so there is an horizontal scroll in both the DIV's

    so when I scroll any one of the DIV's automatically the other DIV
    should also be scrolled according to the amount that the other one was
    scrolled.....

    kindly let me know is there any solution for this

    thanks in advance
    http://www.mavenarts.com
     
    , Nov 17, 2006
    #1
    1. Advertising

  2. Dag Sunde Guest

    wrote:
    > Hi,
    >
    > I have tried many options for this, let me explain ma problem first
    >
    > Think that we have got two Layers
    > <Div id="layer1"> with some horizontal scrolled content </div>
    > <Div id="layer1"> with some horizontal scrolled content (has same
    > content as the above) </div>
    >
    > so there is an horizontal scroll in both the DIV's
    >
    > so when I scroll any one of the DIV's automatically the other DIV
    > should also be scrolled according to the amount that the other one was
    > scrolled.....
    >
    > kindly let me know is there any solution for this


    All bets are off as long as the HTML is invalid!

    The "id" attribute must be unique within a page. So no matter how
    you have tried to make it work with JS, it won't know which div to
    operate on...

    Make sure your html validates first, when you have problems with
    scripting...

    --
    Dag.
     
    Dag Sunde, Nov 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. UJ
    Replies:
    1
    Views:
    614
    John Timney \(MVP\)
    Nov 1, 2006
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    809
  3. Trans
    Replies:
    2
    Views:
    509
    Trans
    Dec 12, 2005
  4. Steve
    Replies:
    1
    Views:
    309
    Richard Cornford
    Apr 9, 2005
  5. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    236
    David Dorward
    Jun 1, 2005
Loading...

Share This Page