[NewsScroller]











Newsscroller

[Code]

[zwischen <HEAD> und </HEAD>]

<SCRIPT LANGUAGE="JavaScript">
/* Original: Dion (yobo42@hotmail.com)
* Web Site: http://www.iinet.net.au/~biab/
* Modified by N8i (www.nightfire.ch)
*/

<!-- Begin

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

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

//Browser Sniffer
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var mozup = (!document.all && document.getElementById) ? 1 : 0;

function scrollnews(cliptop) {
if (ns4up) {
newsDiv = document.news;
newsDiv.clip.top = cliptop;
newsDiv.clip.bottom = cliptop + boxheight;
newsDiv.clip.left = 0;
newsDiv.clip.right = boxwidth + leftedge;
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
else if (ie4up) {
newsDiv = news.style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
}
else if (mozup) {
newsDiv = document.getElementById("news").style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 150);
}
// End -->
</script>

[IN den <BODY> Tag]

OnLoad="scrollnews(0)"

[zwischen <BODY> und </BODY>]

<div ID="news" style="position:absolute; visibility:hidden; top:1; left:1; 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 -->

<span id="red">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:yobo42@hotmail.com">yobo42@hotmail.com</a></span>

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

</td>
</tr>
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
</table>
</div>

[Autor]

Dion (yobo42@hotmail.com)
modified by N8i (www.nightfire.ch)

[Download]

Kopieren Sie bitte den Code

Copyright © 1998- Nightfire Webworker Archiv Script No: 641