Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling Message

Status
Not open for further replies.

DKL01

Programmer
Sep 14, 2000
233
US
Hi,

I need to develop a scrolling message similar to this:

But in my case the the messages should scroll from left to right. It should stop when we cursor moves over the text. I was wondering how to implement this. I really appreciate any suggestions.

THANKS
 
i have modified the file to do that :-
<html>
<body>

<div id=&quot;datacontainer&quot; style=&quot;position:absolute;left:0;top:10;width:100%&quot;

onMouseover=&quot;scrollspeed=0&quot; onMouseout=&quot;scrollspeed=cache&quot;>

<!-- ADD YOUR SCROLLER COMMENT INSIDE HERE--------------------->

<b>What's Hot</b></p>
<p align=&quot;left&quot;><strong><font face=&quot;Verdana&quot;><small><a

href=&quot; target=&quot;_top&quot;>Source
code encrypter</a>&nbsp;</small></font></strong><br>
<font face=&quot;Verdana&quot; size=&quot;2&quot;>Scramble the source of any chunk of code using
this unique script.</font></p>
<p align=&quot;left&quot;><strong><font face=&quot;Verdana&quot;><small><a

href=&quot; target=&quot;_top&quot;>Flashing
links</a>&nbsp;</small></font></strong><br>
<font face=&quot;Verdana&quot;><small>Bring attention to special links, by making them
flash!</small></font></p>
<p align=&quot;left&quot;><small><strong><font face=&quot;Verdana&quot;><a

href=&quot; target=&quot;_top&quot;>Roaming
Cursor</a>&nbsp;</font></strong></small><br>
<small><font face=&quot;Verdana&quot;>Display a second, &quot;roaming&quot; cursor on your
page with this fun animation script.</font></small></p>
<p align=&quot;left&quot;><font face=&quot;Verdana&quot;><strong><a

href=&quot;
target=&quot;_top&quot;><small>Animated
Document title</small></a><br>
</strong><small>Animate into view your document's title!</small></font>

<!-- END SCROLLER CONTENT---------------------------------------->

<div>

<script language=&quot;JavaScript1.2&quot;>

//<iframe> script by Dynamicdrive.com

//Specify speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=2

function initialize(){
marqueeheight=document.all? parent.document.all.datamain.height :

parent.document.getElementById(&quot;datamain&quot;).getAttribute(&quot;height&quot;)
dataobj=document.all? document.all.datacontainer : document.getElementById(&quot;datacontainer&quot;)
dataobj.style.top=5
thelength=dataobj.offsetHeight
scrolltest()
}

function scrolltest(){
dataobj.style.left=parseInt(dataobj.style.left)+scrollspeed
if (parseInt(dataobj.style.left)<thelength*(-1))
dataobj.style.top=5
setTimeout(&quot;scrolltest()&quot;,50)
}

window.onload=initialize

</script>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top