Script Categories













Scrolls >>> News Scroller.

Scrolling words along the bottom of the page is cool and all, but this one takes the cake.... You can scroll text, links, images, buttons, basically anything you want, in a little news like box on your site. And, you can have as many messages as you want.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin

// change this to where you store the blank.gif image
var blank = "blank.gif";

topedge = 350;  // location of news box from top of page
leftedge = 300;  // location of news box from left edge
boxheight = 150;  // height of news box
boxwidth = 510;  // width of news box
scrollheight = 240; // total height of all data to be scrolled

function scrollnews(cliptop) {
newsDiv = document.getElementById('news').style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
//}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 50);
}
//  End -->
</script>
<div ID="news" style="position:absolute; visibility:hidden;
top:150; left:300; height:600;
clip:rect(10,100,100,10); border-width:0px;"
>
<table border=0 cellpadding=1 cellspacing=0 bgcolor="white">
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
<tr>
<td>

<!-- Your News Items are Here -->

This news scroller begins<br>
Displaying text and images<br>
From the bottom of the box<br>
And restarts when all the<br>
Information scrolls above<br>
The top of the box.<br><br>
Any HTML page content can<br>
Be used in this Javascript<br>
Scroller.<br>
<
br>
<a href="mailto:yourmail@hotmail.com">yourmail@hotmail.com</a>

<!-- End Of Your News Items -->

</td>
</tr>
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
function Go()
{
scrollnews(0);
}
window.onload = Go;
</script>
</td>
</tr>
</table>
</div>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

NCEdCloud - My.NcedCloud.org IAM Service - NCEDCloud Login


©