Connecting Tech Pros Worldwide Help | Site Map

DHTML Javascript DIV Scroll Sync Script?

  #1  
Old November 17th, 2006, 05:35 AM
sravkum@gmail.com
Guest
 
Posts: n/a
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

  #2  
Old November 17th, 2006, 09:45 AM
Dag Sunde
Guest
 
Posts: n/a

re: DHTML Javascript DIV Scroll Sync Script?


sravkum@gmail.com wrote:
Quote:
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.



Closed Thread