?
Solved

div overflow autoscroll, auto start when page loads, vertical scroller

Posted on 2008-06-22
11
Medium Priority
?
916 Views
Last Modified: 2013-11-19
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!
<div style="overflow:auto;height:700px;">{$MAIN_CONTENT}</div>

Open in new window

0
Comment
Question by:whatsthedealhere
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 

Author Comment

by:whatsthedealhere
ID: 21840542
one thing to ad: the scrolling should pause on mouseover, to allow the user to click on one of the items in the {$MAIN_CONTENT}
0
 
LVL 10

Expert Comment

by:bluefezteam
ID: 21840617
http://www.dynamicdrive.com/dynamicindex2/mikescroll.htm

Useful script, cross browser and very configurable - why reinvent the wheel
0
 

Author Comment

by:whatsthedealhere
ID: 21840687
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>");

Open in new window

0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

Author Comment

by:whatsthedealhere
ID: 21841000
does anyone have an answer to this one?
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 21842808
I don't think you should be using overflow:auto.  If you are trying to correct the IE bug, use overflow:visible;
0
 

Author Comment

by:whatsthedealhere
ID: 21843565
@scrathcyboy thanks for that

I still need help to make the div autoscroll up and down on its own. Please help!
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 2000 total points
ID: 21843622
0
 

Author Comment

by:whatsthedealhere
ID: 21847387
@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 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_22895384.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?
0
 
LVL 16

Expert Comment

by:Lolly-Ink
ID: 21851258
The answer you refer to (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_22895384.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.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 21861458
remove the overflow:auto, as I said, and see what happens.  Also test it on FF and Mozilla.  Report
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question