PDA

View Full Version : scrollable content aint content to scroll



moscarda
02-02-2009, 08:27 AM
1) Script Title:
Scrollable content II

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm

3) Describe problem:

i can always get this code working until i actually embed it somewhere...

check out:
http://www.haputnam.com/test/sample.html

jscheuer1
02-02-2009, 08:43 AM
There could be other problems, but generally elements with no display have no offset dimensions. The scroller uses offsetHeight while loading to determine what numbers to use when setting the limits of scrolling, if there is no offsetHeight, this will not happen.

If you add (highlighted):


<input type="button" value="Center"
onclick="popup_show('popup', 'popup_drag', 'popup_exit', 'screen-center', 0, 0);
contentheight=crossobj.offsetHeight">

That should take care of that.

moscarda
02-02-2009, 08:48 AM
brilliant, cheers