hi,
here the javascript code u can use for your problem :
u open the scroll.txt (file with javascript code)
u open your txt file
u include in your html page the scroll.txt lines (line by line)
and when the line="####REPLACE HERE####" you
create the line yourself with your txt file to obtain :
var msg=<your scrolling text>
scroll.txt :
<SCRIPT language="JAVASCRIPT">
<!--
/* Copyright (C)1996 Web Integration Systems, Inc. DBA Websys, Inc.
All Rights Reserved.
This applet can be re-used or modified, if credit is given in the source
code
.
mods by gt 8/28/96
*/
function scrollit_r2l(seed)
{
### REPLACE HERE ### /*will become var msg=<scrolling text in your html page>
*/
var out = " ";
var c = 1;
if (seed > 90) {
seed--;
var cmd="scrollit_r2l(" + seed + ")";
timerTwo=window.setTimeout(cmd,90);
}
else if (seed <= 90 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,90);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,90);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit_r2l(90)",85);
}
}
}
//-->
</script>
good luck ;o),
regards, Cyril
ALEX L wrote:
> Hi there,
> this might not be a servlet problem but is anybody out there knows how
> to make scrolling text within a html page?
> i want to know how of which the text to scroll on the page is from a
> .txt file.
> is it possible to retrieve values from that .txt file and scroll it
> across the screen.
> if anyone can supply me with some codes, i will be appreciated.
> codes either in html(if possible), java or javascript. any one which
> is best for my case and simple.
> thanks a lot for ur time.
>
> regards,
> alex
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html