[Seaside] [VW7.8NC] - How to display a News ticker on the bottom
of a screen
Bob Arning
arning at charm.net
Fri Oct 14 16:11:34 UTC 2011
This one's a bit smoother...
renderContentOn: html
| id longString |
longString _ String streamContents: [ :strm |
1 to: 100 do: [ :i | strm nextPutAll: ' ',i asString,'. Info
for this item.'].
].
html script: '
var UUBox = 0;
var UULeft = 0;
var UUInterval = 100;
var UUShift = 0;
function ShiftLeftALittle() {
UULeft = UULeft + UUShift;
UUBox.style.left = UULeft+"px";
if (UULeft>UULimit)
{window.setTimeout("ShiftLeftALittle()",UUInterval)}
}
function StartShifting(boxname,interval,x,shift,limit) {
UUBox = document.getElementById(boxname);
UULeft = x;
UUInterval = interval;
UUShift = shift;
UULimit = limit;
ShiftLeftALittle();
}
'.
html div
id: (id _ html nextId);
style:
'right: -21000px;
left: 0px;
bottom: 0;
z-index: 20;
padding: 2px;
position: fixed;
text-align: left;
background-color: #eee;
border-top: 1px solid #aaa;
height: 18px;
font-size: 14px;
overflow: hidden;';
with: longString.
html document addLoadScript:
(JSStream new
nextPutAll: 'StartShifting';
arguments: {id. 20. 0. -2. -8000};
yourself).
Cheers,
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111014/80c470d6/attachment.htm
More information about the seaside
mailing list