Solved

Rotating static text in a <FORM> marquee

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

830 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