Solved

Rotating static text in a <FORM> marquee

Posted on 1997-09-12
4
383 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
alert before form submission 6 30
Javascript: How to show value of a specific value 5 44
Split in Javascript 5 30
Sorting a string 1 10
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

911 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

21 Experts available now in Live!

Get 1:1 Help Now