here is my code. this is working fine but small prblm is here.fading text is working only one time. it is not working multiple times. can anybody check what is the prblm is der? rotation not working.just copy paste this codeand see what is the prblm is there.first time loop is rotating but second time "undefined" comming.
<?php
ob_start();
extract($_REQUEST);
extract($_POST);
session_start();
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$db=mysql_select_db('murali',$con);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript">
<!-- Paste this code into an external JavaScript file named: marquee.js -->
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Mike Hudson :: http://www.afrozeus.com */
function setupFadeLinks() {
<?
$i=0;
$select=mysql_query("select * from registration where status=1");
while($fetch=mysql_fetch_array($select))
{
?>
arrFadeTitles[<?=$i?>]='<?=$fetch[email]?>';
arrFadeTitles1[<?=$i?>]='<?=$fetch[username]?>';
<?
$i++;
}
?>
}
// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.
var m_FadeOut = 255;
var m_FadeIn=0;
var m_Fade = 0;
var m_FadeStep = 3;
var m_FadeWait = 1600;
var m_bFadeOut = true;
var m_iFadeInterval;
window.onload = Fadewl;
var arrFadeTitles;
var arrFadeTitles1;
var arrFadeCursor = 0;
var arrFadeMax;
function Fadewl() {
m_iFadeInterval = setInterval(fade_ontimer, 10);
arrFadeTitles = new Array();
arrFadeTitles1 = new Array();
setupFadeLinks();
setFadeLink();
}
function setFadeLink() {
var ilink = document.getElementById("fade_link");
ilink.innerHTML = arrFadeTitles[arrFadeCursor];
var jlink = document.getElementById("fade_link1");
jlink.innerHTML = arrFadeTitles1[arrFadeCursor];
}
function fade_ontimer() {
if (m_bFadeOut) {
m_Fade+=m_FadeStep;
if (m_Fade>m_FadeOut) {
arrFadeCursor++;
if (arrFadeCursor>arrFadeMax)
arrFadeCursor=0;
setFadeLink();
m_bFadeOut = false;
}
} else {
m_Fade-=m_FadeStep;
if (m_Fade<m_FadeIn) {
clearInterval(m_iFadeInterval);
setTimeout(Faderesume, m_FadeWait);
m_bFadeOut=true;
}
}
var ilink = document.getElementById("fade_link");
if ((m_Fade<m_FadeOut)&&(m_Fade>m_FadeIn))
ilink.style.color = "#" + ToHex(m_Fade);
var ilink = document.getElementById("fade_link1");
if ((m_Fade<m_FadeOut)&&(m_Fade>m_FadeIn))
jlink.style.color = "#" + ToHex(m_Fade);
}
function Faderesume() {
m_iFadeInterval = setInterval(fade_ontimer, 10);
}
function ToHex(strValue) {
try {
var result= (parseInt(strValue).toString(16));
while (result.length !=2)
result= ("0" +result);
result = result + result + result;
return result.toUpperCase();
}
catch(e)
{
}
}
</script>
</head>
<body>
<div id="fade_base" style="width:250px;padding:5px;height:60px;line-height:1.8em;">
<strong><em><lable id="fade_link"></lable>
<lable id="fade_link1"></lable>
</em></strong>
</div>
</body>
</html>