//**************************************************
// News Bar *
// Date created : 1 March, 2002 *
// (c) 2002 Premshree Pillai. All rights reserved. *
// http://www.qiksearch.com *
// [email protected] *
// Visit http://www.qiksearch.com/javascripts.htm *
// for FREE scripts *
// Use freely as long as this message is intact *
//**************************************************
// Location : http://www.qiksearch.com/javascripts/news-bar.htm
var msgs = new Array(
"Welcome to Qiksearch",
"FREE Javascripts",
"Intellisearch Bar NOW!",
"www.qiksearch.com",
"FREE Articles" ); // No comma after last ticker msg
var msg_url = new Array(
"http://www.qiksearch.com",
"http://www.qiksearch.com/javascripts.htm",
"http://intellisearch.cjb.net",
"http://www.qiksearch.com",
"http://www.qiksearch.com/articles.htm" ); // No comma after last ticker url
function init_news_bar()
{ this.document.news_bar.news_bar_but.value=msgs[count];
}
function prev_news()
{ if(count>0)
{
count-=1; this.document.news_bar.news_bar_but.value=msgs[count];
} else
{
window.alert("This is the first News Item");
}
}
function next_news()
{ if(count<msgs.length-1)
{
count+=1; this.document.news_bar.news_bar_but.value=msgs[count];
} else
{
window.alert("This is the last News Item");
}
}
function goURL()
{
location.href=msg_url[count];
}
init_news_bar();
</script>
<table width="400" align="center" cellspacing="0" cellpadding="0"><tr><td>
<font face="verdana,arial,helvetica" size="-1" color="#000000">
This is a Cross Browser Javascript News Bar that displays a number of messages on a button.
To see the next news item, click on the right arrow (Next). To view the previous news item, click on the left arrow. (Previous)
<br><br>This news bar 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">msgs</font> and the URLs must
be added to the array <font face="courier">msg_url</font>.
<br><br>This news bar displays the messages on a button. You can change the style of the button easily.
<br><br>To use this script, you just have to copy the <script> section of the source and paste it wherever you require on your web page.
<br><br><hr style="width:100%; height:1; color:#007000">
<a href="mailto:[email protected]?Subject=Javascripts" class="link">© 2002 Premshree Pillai. All rights reserved.</a>