Text Box Ticker : Ticker « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Event
7. Event onMethod
8. Form Control
9. GUI Components
10. HTML
11. Javascript Collections
12. Javascript Objects
13. Language Basics
14. Node Operation
15. Object Oriented
16. Page Components
17. Security
18. Style Layout
19. Table
20. Utilities
21. Window Browser
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
JavaScript DHTML » GUI Components » Ticker 
Text Box Ticker

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Text Box Ticker</title>
<style type="text/css">
.link{font-family:verdana,arial,helvetica; font-size:8pt; color:#808080; font-weight:normal}
.link:hover{font-family:verdana,arial,helvetica; font-size:8pt; color:#FF9900; font-weight:normal}
.header{font-family:arial,verdana,helvetica; font-size:25pt; color:#FF9900; font-weight:bold; filter:DropShadow(color=#000000, offX=2, offY=2, positive=1); width:100%}
.TextBoxTicker{background:#FCFCFC; border:#808080 solid 1px; text-align:center; cursor:pointer}
</style>
</head>
<body bgcolor="#FFFFFF">

<center>
<span class="header">Text Box Ticker</span>
<br>
<script language="JavaScript">

// Text Box Ticker                      
// (c) 2002 Premshree Pillai.
// http://www.qiksearch.com
// [email protected]

document.write('<form name="qiksearch_ticker"><input type="text" class="TextBoxTicker" onfocus="goURL();this.blur();" name="qiksearch_ticker" size="55"></form>');

var count=0;
var ticker_speed=1;
 
 // Ticker messages
 var ticker_msg = new Array(
     "Welcome to Qiksearch",
     "Download Javascripts",
     "Intellisearch Bar NOW!",
     "FREE Articles" )// No comma after last ticker msg

 // Ticker URLs
 var ticker_url = new Array(
     "http://www.qiksearch.com",
     "http://www.simtel.net/pub/pd/57885.html",
     "http://www.simtel.net/pub/pd/57634.html",
     "http://www.qiksearch.com/articles.htm" )// No comma after last ticker url

function TextBoxTicker()
{
 if(count<ticker_msg.length)
 {  
  this.document.qiksearch_ticker.qiksearch_ticker.value=ticker_msg[count];
  count++;
  if(count==ticker_msg.length)
  {
   count=0;
  }
  setTimeout("TextBoxTicker();",ticker_speed*1000);
 }
}

function goURL()
{
 if(this.document.qiksearch_ticker.qiksearch_ticker.value==ticker_msg[ticker_msg.length-1])
 {
  location.href=ticker_url[ticker_msg.length-1];
 }
 else
 {
  location.href=ticker_url[count-1];
 }
}

TextBoxTicker();

</script>

<table width="400" align="center" cellspacing="0" cellpadding="0"><tr><td>
<font face="verdana,arial,helvetica" size="-1" color="#000000">
This is a Javascript Text Box Ticker that ticks a number of messages on a Text Box.
<br><br>This ticker is very easy to customise. You can add any number of messages and their corresponding URLs. Messages must be added to the array <font face="courier">ticker_msg</font> and the URLs must
be added to the array <font face="courier">ticker_url</font>.
<br><br>The ticker speed can be changed easily by changing the value of the variable <font face="courier">ticker_speed</font>. (Here it is 1, which means that the message would change every second.)
<br><br>To use this script, you just have to copy the &lt;script&gt; section of the source and paste it wherever you require on your web page.
<br><br><hr style="width:100%; height:1; color:#000000">

<a href="http://www.qiksearch.com" class="link">&#169 2002 Premshree Pillai. All rights reserved.</a>
</font>
</td></tr></table>

</center>
</body>
</html>

           
       
Related examples in the same category
1. XML Ticker (IE)
2. JavaScript Ticker using Tabular Data Control
3. Fading Ticker for IE
4. JavaScript Ticker 1.3 (IE)
5. Button Ticker
6. News Bar
w_w_w.j_a__v_a___2s.__c__o___m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.