Connecting Tech Pros Worldwide Forums | Help | Site Map

DHTML Javascript DIV Scroll Sync Script?

sravkum@gmail.com
Guest
 
Posts: n/a
#1: Nov 17 '06
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


Dag Sunde
Guest
 
Posts: n/a
#2: Nov 17 '06

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