Hi,
I'm building a scrolling ticker, using the script from:
http://javascript.internet.com/scrol...scroller.html.
I'm scrolling a single-row table, building it by adding four cells at a time (see snippet below).
All was dandy for the first eight insertions (* four cells each time=32 cells). On the ninth, the ticker runs fine through the first eight, but then truncates (ticker breaks off and starts again) in the middle of a cell entry ("400") in the 2nd cell of the four just inserted.
The code is pasted from the identical snippet source, which leads me to suspect I've hit some limit on how much the ticker can display. Help, please?
The entire page can be seen at:
http://home.earthlink.net/~rockypier...ORKnewLogo.htm
Here's the snippet:
<td width="25%" height="23" bgcolor="#000066">
<div align="center"> <b><font size="2" color="#ff6600">INSERT MAKE</font></b></div>
</td>
<td width="27%" height="23" bgcolor="#000066">
<div align="center"> <b><font size="2" color="#ff6600">INSERT MODEL</font></b></div>
</td>
<td width="24%" height="23" bgcolor="#000066">
<div align="center"><b><font size="2" color="#ffffff"><cfoutput>#TickerDiffQ.NOFSNEW#</cfoutput></font></b></div>
</td>
<td width="12%" height="23" bgcolor="#000066">
<div align="center"><b><font size="2" color="#ff6600"><cfoutput>#TickerDiffQ.NOFSDIFF#</cfoutput></font></b></div>
</td>
and here are the params for the layer:
<SCRIPT language=JavaScript1.2>
// By Ernst Straka ([email protected] http://www.rs-systems.at/straka)
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
var l1 = 0; // left of ticker in pixel, or 0 to position relative
var t1 = 0; // top of ticker in pixel, or 0 to position relative
var w1 = 330; // width of ticker in pixel
var ie = document.all ? true : false;
var first = true;
var l2 = l1 + w1;
var l3 = l1 - l2;
var l = l2;
function tickinit() {
if (ie) {
if (l1 == 0 && t1 == 0) {
pos = document.all['tickpos'];
l1 = getLeft(pos);
t1 = getTop(pos);
}
ticktext.style.posTop = t1;
}
else {
if (l1 == 0 && t1 == 0) {
pos = document.anchors['tickpos'];
l1 = pos.x;
t1 = pos.y;
}
document.ticktext.pageY = t1;
}
l2 = l1 + w1;
l3 = l1 - l2;
l = l2;
setInterval('tick()',500);
}
function getLeft(ll) {
if (ll.offsetParent)
return (ll.offsetLeft + getLeft(ll.offsetParent));
else
return (ll.offsetLeft);
}
function getTop(ll) {
if (ll.offsetParent)
return (ll.offsetTop + getTop(ll.offsetParent));
else
return (ll.offsetTop);
}
function tick() {
l = l - 10;
if (l < l3) l = l2;
cl = l1 - l;
cr = l2 - l;
if (ie) {
ticktext.style.posLeft = l;
ticktext.style.posTop = t1;
ticktext.style.clip = "rect(auto "+cr+"px auto "+cl+"px)";
if (first) ticktext.style.visibility = "visible";
}
else {
document.ticktext.pageX = l;
document.ticktext.clip.left = cl;
document.ticktext.clip.right = cr;
if (first) document.ticktext.visibility = "show";
}
first = false;
}
</SCRIPT>
and
<a name=tickpos> </a>
<div id=ticktext
style="FONT-SIZE: 14pt; LEFT: 127px; VISIBILITY: hidden; WIDTH: 198px; FONT-FAMILY: book antiqua; POSITION: absolute; TOP: 292px; HEIGHT: 24px"><nobr></nobr>
<table width="95%" cellpadding="2">
<tr>
<!--INSERTING CELLS HERE -->
I'm building a scrolling ticker, using the script from:
http://javascript.internet.com/scrol...scroller.html.
I'm scrolling a single-row table, building it by adding four cells at a time (see snippet below).
All was dandy for the first eight insertions (* four cells each time=32 cells). On the ninth, the ticker runs fine through the first eight, but then truncates (ticker breaks off and starts again) in the middle of a cell entry ("400") in the 2nd cell of the four just inserted.
The code is pasted from the identical snippet source, which leads me to suspect I've hit some limit on how much the ticker can display. Help, please?
The entire page can be seen at:
http://home.earthlink.net/~rockypier...ORKnewLogo.htm
Here's the snippet:
<td width="25%" height="23" bgcolor="#000066">
<div align="center"> <b><font size="2" color="#ff6600">INSERT MAKE</font></b></div>
</td>
<td width="27%" height="23" bgcolor="#000066">
<div align="center"> <b><font size="2" color="#ff6600">INSERT MODEL</font></b></div>
</td>
<td width="24%" height="23" bgcolor="#000066">
<div align="center"><b><font size="2" color="#ffffff"><cfoutput>#TickerDiffQ.NOFSNEW#</cfoutput></font></b></div>
</td>
<td width="12%" height="23" bgcolor="#000066">
<div align="center"><b><font size="2" color="#ff6600"><cfoutput>#TickerDiffQ.NOFSDIFF#</cfoutput></font></b></div>
</td>
and here are the params for the layer:
<SCRIPT language=JavaScript1.2>
// By Ernst Straka ([email protected] http://www.rs-systems.at/straka)
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
var l1 = 0; // left of ticker in pixel, or 0 to position relative
var t1 = 0; // top of ticker in pixel, or 0 to position relative
var w1 = 330; // width of ticker in pixel
var ie = document.all ? true : false;
var first = true;
var l2 = l1 + w1;
var l3 = l1 - l2;
var l = l2;
function tickinit() {
if (ie) {
if (l1 == 0 && t1 == 0) {
pos = document.all['tickpos'];
l1 = getLeft(pos);
t1 = getTop(pos);
}
ticktext.style.posTop = t1;
}
else {
if (l1 == 0 && t1 == 0) {
pos = document.anchors['tickpos'];
l1 = pos.x;
t1 = pos.y;
}
document.ticktext.pageY = t1;
}
l2 = l1 + w1;
l3 = l1 - l2;
l = l2;
setInterval('tick()',500);
}
function getLeft(ll) {
if (ll.offsetParent)
return (ll.offsetLeft + getLeft(ll.offsetParent));
else
return (ll.offsetLeft);
}
function getTop(ll) {
if (ll.offsetParent)
return (ll.offsetTop + getTop(ll.offsetParent));
else
return (ll.offsetTop);
}
function tick() {
l = l - 10;
if (l < l3) l = l2;
cl = l1 - l;
cr = l2 - l;
if (ie) {
ticktext.style.posLeft = l;
ticktext.style.posTop = t1;
ticktext.style.clip = "rect(auto "+cr+"px auto "+cl+"px)";
if (first) ticktext.style.visibility = "visible";
}
else {
document.ticktext.pageX = l;
document.ticktext.clip.left = cl;
document.ticktext.clip.right = cr;
if (first) document.ticktext.visibility = "show";
}
first = false;
}
</SCRIPT>
and
<a name=tickpos> </a>
<div id=ticktext
style="FONT-SIZE: 14pt; LEFT: 127px; VISIBILITY: hidden; WIDTH: 198px; FONT-FAMILY: book antiqua; POSITION: absolute; TOP: 292px; HEIGHT: 24px"><nobr></nobr>
<table width="95%" cellpadding="2">
<tr>
<!--INSERTING CELLS HERE -->
Comment