Solved

Faster text scroll

Posted on 2007-11-19
1
287 Views
Last Modified: 2010-04-06
I have text that scrolls on this page, www.nuacs.com. It starts too slow. How can I start it faster.
0
Comment
Question by:stevek65
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
eulac earned 250 total points
ID: 20313170
try using this javascript, instead of marquee.. you can set the scroll delay here.


<html>
 <head>
  <title>scrolling text with JavaScript and forms</title>
  <script>

message = "This is a scrolling marquee message.";
initial_delay = 0;
scroll_delay = 75;
max_indent = 50;

function scroll ()
{
    message =   message . substring (1, message . length)
              + message . substring (0, 1);
    document . scrollbox_form . scrollbox . value = message;
    window . setTimeout ("scroll ()", scroll_delay);
}

function start_scroll ()
{
    for (var i = 1; i <= max_indent; i ++)
        message = " " + message;
    scrollbox = document . scrollbox_form . scrollbox;
    window . setTimeout ("scroll ()", initial_delay);
}

  </script>
 </head>
 <body onLoad="start_scroll ();">
  This text appears above the marquee.
  <form name=scrollbox_form>
   <input type=text name=scrollbox size=25>
  </form>
  This text appears below the marquee.
 </body>
</html>
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to count occurrences of each item in an array.

695 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