hello everybody,
this is the link
http://news.bbc.co.uk/
as see this there is newsbar that is displaying the latest news
i want to do the same have the javascript for this but i want this script to acess database and display the latest data...
here is the html
<HTML>
<HEAD>
<title></title>
<meta http-equiv="content-type" ontent="text/html;charset=iso-8859-1">
</HEAD>
<body>
<div class="ticki"><a class="tickl" id="tickerAnchor" style="TEXT-DECORATION: none" href="http://news.bbc.co.uk/" target="_top">
<span class="tickls">LATEST: </span></a></div>
<script language="JavaScript" type="text/javascript">
<!--
// Ticker startup
function startTicker()
{
// Define run time values
theCurrentStory = -1;
theCurrentLength = 0;
// Locate base objects
if (document.getElementById)
{
theAnchorObject = document.getElementById("tickerAnchor");
runTheTicker();
}
else
{ document.write("<style>.ticki{display:none;}.ticko {border:0px; padding:0px;}</style>");
return true;
}
}
// Ticker main run loop
function runTheTicker()
{
var myTimeout;
// Go for the next story data block
if(theCurrentLength == 0)
{
theCurrentStory++;
theCurrentStory = theCurrentStory % theItemCount;
theStorySummary = theSummaries[theCurrentStory].replace(/"/g,'"');
theTargetLink = theSiteLinks[theCurrentStory];
theAnchorObject.href = theTargetLink;
thePrefix = "<span class=\"tickls\">" + theLeadString + "</span>";
}
// Stuff the current ticker text into the anchor
theAnchorObject.innerHTML = thePrefix +
theStorySummary.substring(0,theCurrentLength) + whatWidget();
// Modify the length for the substring and define the timer
if(theCurrentLength != theStorySummary.length)
{
theCurrentLength++;
myTimeout = theCharacterTimeout;
}
else
{
theCurrentLength = 0;
myTimeout = theStoryTimeout;
}
// Call up the next cycle of the ticker
setTimeout("runTheTicker()", myTimeout);
}
// Widget generator
function whatWidget()
{
if(theCurrentLength == theStorySummary.length)
{
return theWidgetNone;
}
if((theCurrentLength % 2) == 1)
{
return theWidgetOne;
}
else
{
return theWidgetTwo;
}
}
// -->
</script>
<script language="JavaScript" type="text/javascript">
<!--
var theCharacterTimeout = 50;
var theStoryTimeout = 5000;
var theWidgetOne = "_";
var theWidgetTwo = "-";
var theWidgetNone = "";
var theLeadString = "Recent: ";
var theSummaries = new Array();
var theSiteLinks = new Array();
var theItemCount = 4;
theSummaries[0] = "School students in Chile reject government offer aimed at ending protests.";
theSiteLinks[0] = "/2/hi/americas/5042758.stm";
theSummaries[1] = "Canadian police arrest at least 10 in anti-terror operation in Toronto.";
theSiteLinks[1] = "/2/hi/americas/5043408.stm";
theSummaries[2] = "Seven members of same family shot dead during apparent robbery in Indianapolis.";
theSiteLinks[2] = "/2/hi/americas/5043056.stm";
theSummaries[3] = "A cannabis plant extract provides pain relief after major surgery, research shows.";
theSiteLinks[3] = "/2/hi/health/5040960.stm";
startTicker();
//-->
</script>
</body>
how do i integrate this with my code behind to pass array values from database
Best Regards,
Vivek.