Forum Moderators: open

Message Too Old, No Replies

Javascript horizontal text scroller

Javascript horizontal text scroller

         

PumpkinHead

2:05 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



Hi,

Could someone please recommend a free horizontal text scroller. I would like to be able to change the font/colour/bgcolour and I also need it to read from a seperate text file.

Any thoughts? Thanks people :)

Rambo Tribble

3:05 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are a lot of scrollers that use a forms text box to scroll. Either that or an iframe should allow you to scroll content from a separate file, but I haven't seen any that were out of the box that way. I think you'll have to do some custom coding, but I could be wrong. It might be easier to include the text in a .js file that holds the function as well.

Google JavaScript and you can find plenty of free script sites. To control colors, just use CSS.

PumpkinHead

7:08 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



Hi again, I'm learning web development and at present have no plans to learn java script. I have a script that I use already and it's perfect but it doesn't read from a text file.

Would this small script be easy to edit so that it reads in from a text file?

Purple Martin

9:45 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes it would be easy.

1. Call your text file scroller.js

2. Put your text in the file like this:

var myText = "This is the text for my scroller."

3. Add this line immediately after the <head> tag in your page:
<script type="text/javascript" src="scroller.js"></script>

4. Now you can use the variable called myText in your scroller code to put your text in.