View Full Version : ticker broken in all but IE

10-01-2008, 06:31 PM
I have placed a ticker on my personal web page to thank someone, I would like this thing to work but I have no idea what I have done to it. I got the code from here http://www.mioplanet.com/rsc/newsticker_javascript.htm and the only changes I made to it was font color, size, and a couple changes to the HTLM code so it would is W3C Strict. It works in IE but doesn’t in any other browser. Any help accepted.

My Site http://www.radamsiii.com/links.html

// WebTicker by Mioplanet
// www.mioplanet.com

TICKER_CONTENT = document.getElementById("TICKER").innerHTML;
TICKER_STYLE = "font-family:Elephant, Arial; font-size:14px; color:#000080";


function ticker_start() {
var tickerSupported = false;
TICKER_WIDTH = document.getElementById("TICKER").style.width;
var img = "<img src=ticker_space.gif width="+TICKER_WIDTH+" height=0>";

// Firefox
if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1) {
document.getElementById("TICKER").innerHTML = "<table width='100%'><tr><td nowrap='nowrap'>"+img+"<span style='"+TICKER_STYLE+"' id='TICKER_BODY' width='100%'>&nbsp;</span>"+img+"</td></tr></table>";
tickerSupported = true;
// IE
if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1) {
document.getElementById("TICKER").innerHTML = "<div nowrap='nowrap' style='width:100%;'>"+img+"<span style='"+TICKER_STYLE+"' id='TICKER_BODY' width='100%'></span>"+img+"</div>";
tickerSupported = true;
if(!tickerSupported) document.getElementById("TICKER").outerHTML = ""; else {
document.getElementById("TICKER").scrollLeft = TICKER_RIGHTTOLEFT ? document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth : 0;
document.getElementById("TICKER_BODY").innerHTML = TICKER_CONTENT;


function TICKER_tick() {
if(!TICKER_PAUSED) document.getElementById("TICKER").scrollLeft += TICKER_SPEED * (TICKER_RIGHTTOLEFT ? -1 : 1);
if(TICKER_RIGHTTOLEFT && document.getElementById("TICKER").scrollLeft <= 0) document.getElementById("TICKER").scrollLeft = document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth;
if(!TICKER_RIGHTTOLEFT && document.getElementById("TICKER").scrollLeft >= document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth) document.getElementById("TICKER").scrollLeft = 3;
window.setTimeout("TICKER_tick()", 30);


<div id="TICKER" style="overflow:hidden; width:98%" onmouseover="TICKER_PAUSED=true" onmouseout="TICKER_PAUSED=false">
A special Thank You to Ashley's grandmother Teresa, without whom her educational dreams would be shattered.
<script type="text/javascript" src="ticker.js"></script>
<br />


10-02-2008, 03:05 PM
I don't see any javascript code in the above link.

10-02-2008, 03:36 PM
I could not get it to work, so I went with a different Java code that works in other browsers. This code I cannot center or create bold script, have to run it in size 18, wanted 14 bold. The books I bought all talk about numbers and boxes, making things more for office type applications. What is a good book to get to learn this for a web application?

Thank you for looking

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum