#featureBlog{
</style>
echo'
<SCRIPT type="text/javascript">
var quotations = new Array();';
$i=0;
$sql="select title,link,desc from table";
$rs=mysql_query($sql,$dbc)or die('Error in fetching title:-'.mysql_error());
while($row=mysql_fetch_array($rs)){
echo 'quotations['.$i.']="<a href=\".$row["link"].'\"><span id=featureBlog>'.ucfirst($row["title"]).'<br><span id=featureBlogDesc>'.ucfirst($row["desc"]).'</span></a>";';
$i++;
}
echo'
function display()
{
a=Math.floor(Math.random()*quotations.length)
document.getElementById(\'quotation\').innerHTML=quotations[a]
setTimeout("display()",5000)
}
</SCRIPT>
';
?>
<div id="quotation" style="position:absolute; width:200; height:102; left:150; top:150; border-style:solid; border-width:1px; border-color:#000000;">
<SCRIPT type="text/javascript">display()</SCRIPT>
</div>
No comments:
Post a Comment