This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Ticker in Html (For every Browser)  (Read 3604 times)

Kian

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 18
    • View Profile
Ticker in Html (For every Browser)
« on: March 18, 2010, 04:22:07 pm »
Hey guys,  I show you how to create a ticker like marquee but you can see it in every browser.

First at the top of your html file write:

Code: [Select]
<script language="javascript">
var tickertext = " Here ticker Text      ";
var start = 0;
var stop = tickertext.length;
function tickerr() {
document.ticker.ticker.value = "" + tickertext.substring(start,stop) + " " + tickertext.substring(0,start);
start++;
if(start >= stop) { start = 0; }
setTimeout("tickerr()", 120);
}
</script>


And at the place where you want to place the ticker:

Code: [Select]
<table cellspacing="0" cellpadding="0" summary="" border="0">
  <tbody>
    <tr>
      <td>
        <form name="ticker">
          <input style=
          "BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: #eeeeee 1px solid; BORDER-LEFT: #eeeeee 1px solid; WIDTH: 250px; COLOR: black; BORDER-BOTTOM: #eeeeee 1px solid"
          name="ticker">
        </form>
        <script language="javascript">
        tickerr();
        </script>
      </td>
    </tr>
  </tbody>
</table>


Now you can customize it. Have fun

Kian
« Last Edit: January 01, 1970, 01:00:00 am by Admin »