Solved

Rotating static text in a <FORM> marquee

Posted on 1997-09-12
4
388 Views
Last Modified: 2012-06-21
I want to be able to rotate a static text in a marquee WITHOUT scrolling. I want one message (from an array) to be shown, say two seconds, then a one second pause and then the second message etc. I've done something like an ordinary banner-rotator but i can't seem to get the text string not to scroll.
I have posted this question before but it seems to have mysteriously disappeared (along with 100 of my points) so here goes again.
Algabatz

ADDITION: What i actually would like to do is a News Ticker in the manner of CNN:s at cnn.com. Either with javaScript (preferred) or in Java. This is how far i have gotten, but i don't want it to scroll, but want one static message at the time (preferrably in choosable colours).

<SCRIPT LANGUAGE = "JavaScript">
<!-- //CLOAKED
ScrollSpeed = 200;  // milliseconds between scrolls
ScrollChars = 1;  // chars scrolled per time period

function ScrollMarquee() {
   // set up the timer for the next scroll increment
   window.setTimeout('ScrollMarquee()', ScrollSpeed);
   // scroll test by moving beginning chars to the end
   var msg = document.scroll.text.value;
   document.scroll.text.value = msg.substring(ScrollChars) +
                                msg.substring(0,ScrollChars);
}
// -->
</SCRIPT>

<BODY>
<form name="scroll" >
<INPUT name="text" size="60"
value=". . . . . . . .THE KING IS DEAD. . . . . . . . . . . LONG LIVE THE QUEEN. . . . . . . . . .AND THE MINISTER OF THE INFERIOR. . . . . ."
</form>

</BODY>

Algabatz
0
Comment
Question by:algabatz
  • 2
4 Comments
 
LVL 1

Expert Comment

by:fun
ID: 1270358
Are you talking about an IE <marquee> tag or just a status bar marquee? I am not sure about how to control an IE <marquee>.
0
 
LVL 1

Author Comment

by:algabatz
ID: 1270359
Edited text of question
0
 
LVL 10

Accepted Solution

by:
kollegov earned 100 total points
ID: 1270360
You can find a lot of Java Applet solutions.
(not java script)
I have some downloadable appletts at my pages
http://www.geocities.com/siliconvalley/lakes/8620

Meanwhile you can search for ready script
(Oh yes no colors) at www.gamelan.com

or use one below:

<html>
<head>
<script>
messages = new Array()
messages[0]="Message 1"
messages[1]="Message 2"
messages[2]="Message 3"
messages[3]="Message 4"

var n=0
var nmessages=3
function scroll()
{
document.kaka.kaka.value=messages[n];
n++;
if(n>nmessages) n=0;
 
setTimeout("scroll()",2000)
}


</script>


</head>

<body onLoad="scroll()">
<FORM NAME=kaka>
<input name=kaka type=text size=40>
</form>

 </body>
</html>


---------Virtual_Max---------
http://www.geocities.com/siliconvalley.lakes/8620




0
 
LVL 1

Author Comment

by:algabatz
ID: 1270361
There's still one problem, i need the European letters å ä and ö also in capitals. &auml; doesn't seem to work inside the script, any ideas?
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question