rdoekes
07-10-2003, 07:30 AM
Hi,
I have a frameset with two pages. The top frame (name="top" src="top.html") contains a HTML page loaded with anchors. The bottom page (name="bottom" src="bottom.html") contains links to the topframe htmlpage
with anchors like: top.html#anchor1, top.html#anchor2
Clicking on the hyperlinks in the bottom frames makes the top frame page scroll to the anchor. So far WAD.
However, as an extra I would like to change the background color of the <div> following the anchor. How to change a color I know (using getElementById(i) and style) .
But which event triggers the scrolling? So when do i need to call the function which changes the color? (if (location.search) only works the first time you call this page, afterwards it bypasses this.
Thanks for any help,
-Rogier Doekes
I have a frameset with two pages. The top frame (name="top" src="top.html") contains a HTML page loaded with anchors. The bottom page (name="bottom" src="bottom.html") contains links to the topframe htmlpage
with anchors like: top.html#anchor1, top.html#anchor2
Clicking on the hyperlinks in the bottom frames makes the top frame page scroll to the anchor. So far WAD.
However, as an extra I would like to change the background color of the <div> following the anchor. How to change a color I know (using getElementById(i) and style) .
But which event triggers the scrolling? So when do i need to call the function which changes the color? (if (location.search) only works the first time you call this page, afterwards it bypasses this.
Thanks for any help,
-Rogier Doekes