TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 337
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 268
  • Total: 268

How do I get this to AUTO scroll?

Started by thefley, March 25, 2008, 02:34:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thefley

<script language="JavaScript" src="http://itde.vccs.edu/rss2js/feed2js.php?src=http%3A%2F%2Fsameerkumar.blogspot.com%2Ffeeds%2Fposts%2Fdefault%3Falt%3Drss&chan=y&num=0&desc=0&date=y&targ=y" type="text/javascript"></script>

<noscript>
View RSS feed
</noscript>



BUT how do I get this to auto scroll? I would like to add it to and article box or I can cut out the dates and time stamp to make smaller for side box...

Thx.

JPDeni



<div style="width:100%; height:150px; overflow: auto">

...

</div>



Play around with the height and width until it's what you like.

thefley

I can't seem to get it to auto scroll.  it just gives me a scrol bar....  what am I doing wrong?

IchBin


thefley

thx again, but I guess I didn't ask right again....  I would like the RSS feeds I have to keep scrolling up as I would like to keep the box hight small.  I seen somewere in some threads that when you mouse over it stops but I can not find it again.

JPDeni

I misunderstood what you wanted.

Here's the gist of it:


echo '
<style type="text/css">

#marqueecontainer{
position: relative;
width: 95%; /*marquee width */
height: 150px; /*marquee height */
overflow: hidden;
padding: 2px;
padding-left: 4px;
}

</style>

<script language="javascript" type="text/javascript">

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=1000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=\'\'

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
if(cross_marquee == null)
   return
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout(\'lefttime=setInterval("scrollmarquee()",30)\', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee


</script>

<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">';

//***** Enter your text here ****//

echo '
</div>
</div>
   ';


Whatever you put into the area that says

//***** Enter your text here ****//

will scroll in the block.

I don't know how to get the rss text, though, so that's up to you.

thefley


This website is proudly hosted on Crocweb Cloud Website Hosting.