Solved

Rotating static text in a <FORM> marquee

Posted on 1997-09-12
4
378 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
Comment Utility
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
Comment Utility
Edited text of question
0
 
LVL 10

Accepted Solution

by:
kollegov earned 100 total points
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now