whatsthedealhere
asked on
div overflow autoscroll, auto start when page loads, vertical scroller
please help, this is driving me crazy and should be a relatively simple thing to achieve.
i have a div with overflow:auto scrollbars. inside the div is a list of dynamic content (image and pictures generated by smarty template code). all i want to do is have the scrollbars scroll down to the bottom, then when it hits the bottom, scroll up to the top.
here's the current code, so simple. please help urgently today so i can get it done by tomorrow! thank you!
i have a div with overflow:auto scrollbars. inside the div is a list of dynamic content (image and pictures generated by smarty template code). all i want to do is have the scrollbars scroll down to the bottom, then when it hits the bottom, scroll up to the top.
here's the current code, so simple. please help urgently today so i can get it done by tomorrow! thank you!
<div style="overflow:auto;height:700px;">{$MAIN_CONTENT}</div>
http://www.dynamicdrive.com/dynamicindex2/mikescroll.htm
Useful script, cross browser and very configurable - why reinvent the wheel
Useful script, cross browser and very configurable - why reinvent the wheel
ASKER
thanks but the problem with that script (and most of the ones i've found online so far) is that it requires me to stipulate each message separately. i have {$MAIN_CONTENT} that's going to do that, so i don't want to/can't create each message staticly like the above script requires. see:
//SET SCROLLER APPEARANCE AND MESSAGES
var myScroller1 = new Scroller(0, 0, 480, 32, 1, 5); //(xpos, ypos, width, height, border, padding)
myScroller1.setColors("#006600", "#ccffcc", "#009900"); //(fgcolor, bgcolor, bdcolor)
myScroller1.setFont("Verdana,Arial,Helvetica", 2);
myScroller1.addItem("<b>Click here for <a href='http://dynamicdrive.com'>Dynamic Drive</a>, the net\'s #1 DHTML site!</b>");
myScroller1.addItem("<b>Visit <a href='http://www.brainjar.com'>Brain Jar</a>, Mike\'s great coding site!</b>");
myScroller1.addItem("<b>Looking for free JavaScripts? Visit <a href='http://javascriptkit.com'>JavaScript Kit.</a>");
myScroller1.addItem("<b>Discuss and get help on web coding, at <a href='http://www.codingforums.com'>CodingForums.com</a></b>");
ASKER
does anyone have an answer to this one?
I don't think you should be using overflow:auto. If you are trying to correct the IE bug, use overflow:visible;
ASKER
@scrathcyboy thanks for that
I still need help to make the div autoscroll up and down on its own. Please help!
I still need help to make the div autoscroll up and down on its own. Please help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@scrathcyboy, thanks for the time it took to respond with those links. Some of them don't have answers and others aren't what I'm looking for.
The one that actually does what I want it to do (https://www.experts-exchange.com/questions/22895384/Problem-with-auto-scrolling-div-going-too-fast.html) doesn't work properly, it scrolls too fast/erratically, even after applying the fix given on the page
Surely this is something others have done successfully before?
The one that actually does what I want it to do (https://www.experts-exchange.com/questions/22895384/Problem-with-auto-scrolling-div-going-too-fast.html) doesn't work properly, it scrolls too fast/erratically, even after applying the fix given on the page
Surely this is something others have done successfully before?
The answer you refer to (https://www.experts-exchange.com/questions/22895384/Problem-with-auto-scrolling-div-going-too-fast.html) works for the div content it is displaying. There may be something in your dynamic content which is causing the erratic behaviour. Test it with one item from the dynamic content, then two, ... until you can pinpoint what is causing the problem.
remove the overflow:auto, as I said, and see what happens. Also test it on FF and Mozilla. Report
ASKER