Text Box Ticker : Ticker « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 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
// qiksearch@rediffmail.com

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
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.