Back to Top
The nuts and bolts for
Creative web development

Anchored scroller offset on page load

Question


My page layout is a centered table in the browser. My scroller is anchored to an image in the centered layout. When the page loads, there is a fraction of a second where the scroller is located in the top left corner before it snaps into place.

So finally the whole page looks at it is supposed to be, but the loading process is awfull. Is there a work-around or setting to control & fix this issue?

Answer


What you can do is: set the visibility property for the outermost scroller layer to 'hidden' initially for your page and show it as the last action on the onLoad event for the BODY tag.

So change this:
#dmx1Scroller {position:absolute; top:190px; left:200px; width:606px; height: 309px; z-index:100; visibility:visible; overflow:hidden; }

into this:
#dmx1Scroller {position:absolute; top:190px; left:200px; width:606px; height: 309px; z-index:100; visibility:hidden; overflow:hidden; }

And change this:
#dmx1Container {position:absolute; left:7px; top:7px; width:570px; height:295px; visibility:visible; clip:rect(0px 570px 295px 0px); overflow:hidden; }

into this:
#dmx1Container {position:absolute; left:7px; top:7px; width:570px; height:295px; clip:rect(0px 570px 295px 0px); overflow:hidden; }

And then apply the standard 'Show/Hide Layer' behavior to the onLoad event for the BODY tag to show #dmx1Scroller again.

Also see: http://www.dmxzone.com/showDetail.asp?TypeId=7&NewsId=5190

Marja Ribbers-de Vroed

Marja Ribbers-de VroedWell, what's there to tell?

I worked as a software engineer for a well-known Dutch software company for about 10 years. But then I decided I did not want to work there anymore.
Since then, I've been working with my husband in our own company.

I "discovered" web development early 2000, and I soon found out that I could actually create my own extra (DHTML) features in Dreamweaver by building custom extensions.
My first extension was Cross-browser AutoScroller, but I've developed several other ones since then.

See All Postings From Marja Ribbers-de Vroed >>

Share this Article

Comments

Scroller Genie dyanimc positioning ... once

Upon page load Scroller Genie is displayed in one position and then snaps to an anchored position.

When changing the position of an image that Scroller Genie is anchored to, when the page loads there can be a fraction of a second where Scroller Genie is located in one position and then snaps to the new anchored position. 

To prevent this snapping and have Scroller Genie in the absolute anchored position after page load using MX2004, I would hide all the layers associated with each Scroller Genie in the Layers panel.  Then I added the Show-Hide Layers Behavior and selected SHOW to all the Scroller Genie layers, and insured that the Show-Hide behavior was the last Behavior in the list.

This did not require any direct code modifications.  Dreamweaver MX 2004 handled it beautifully.