Hello bro…
My program for Information screen using Jquery-horizontal news sticker. I want add refresh page. I was added html syntax for refresh page (red mark). But, I have trouble with it because data always back to number one when time already end on screen.
Someone help me please, for refresh page syntax that it’s not back to number one when time already end.
Here is the script :
<?php include “kon.inc.php”; ?>
<!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>News Ticker Screen</title>
<script type=“text/javascript” src=“jquery.js”></script>
<script type=“text/javascript”>
$(document).ready(function(){
var first = 0;
var speed = 3000;
var pause = 4000;
function removeFirst(){
first = $('table#listticker tr:first').html();
$('table#listticker tr:first')
.animate({opacity: 0}, speed)
.fadeOut('slow', function() {$(this).remove();});
addLast(first);
}
function addLast(first){
last = '<tr style="display:none">'+first+'</tr>';
$('table#listticker').append(last)
$('table#listticker tr:last')
.animate({opacity: 1}, speed)
.fadeIn('slow')
}
interval = setInterval(removeFirst, pause);
});
</script>
<style type=“text/css”>
body{
font-family:“Lucida Grande”, “Lucida Sans Unicode”, Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
background-color: #FFFF99;
}
#listticker{
height:20px;
width:900px;
overflow:hidden;
border:solid 1px #DEDEDE;
padding:6px 10px 14px 10px;;
}
#listticker li{
border:0; margin:0; padding:0; list-style:none;
}
#listticker li{
height:60px;
padding:5px;
list-style:none;
}
#listticker a{
color:#000000;
margin-bottom:
}
#listticker .news-title{
display:block;
font-weight:bold;
margin-bottom:4px;
font-size:15px;
}
#listticker .news-text{
display:block;
font-size:15px;
color:#666666;
}
#listticker img{
float:left;
margin-right:14px;
padding:4px;
border:solid 1px #DEDEDE;
}
body,td,th {
font-size: 16px;
}
.style5 {
color: #FF0000;
font-weight: bold;
}
.style6 {
color: #990000;
font-family: “Times New Roman”, Times, serif;
font-size: 24px;
}
.style8 {
color: #000099;
font-size: 28px;
}
.style15 {color: #FFFF99}
.style19 {
font-family: Arial, Helvetica, sans-serif;
color: #000066;
font-size: 36px;
}
.style20 {color: #000066}
</style>
[SIZE=3][COLOR=Red]<meta http-equiv=‘refresh’ content='100;url=‘index2121.php’>[/COLOR][/SIZE]
<script language=“JavaScript” type=“text/JavaScript”>
<!–
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName==“Netscape”)&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//–>
</script>
</head>
<?php
// query database
$query_ticker = mysql_query(“SELECT
frontend
.antrino
,
frontend
.intgl
,
frontend
.nip
,
frontend
.nama
,
frontend
.instansi
,
frontend
.jenis
,
frontend
.status
FROM frontend
ORDER BY frontend
.antrino
ASC limit 30”);
?>
<body>
<p align=“center”></p>
<table width=“100%” border=“0” cellpadding=“0” cellspacing=“0”>
<!–DWLayoutTable–>
<tr>
<td width=“1230” height=“26” valign=“top”><div align=“center” class=“style5 style6 style8”> <span class=“style19”>DISPLAY STATUS PELAYANAN</span></div></td>
</tr>
<tr>
<td height=“23” valign=“top”><div align=“center” class=“style5 style7”>
<div align=“center”><span class=“style20”>BADAN KEPEGAWAIAN NEGARA KANTOR REGIONAL VI</span> <span class=“style20”>-</span><span class=“style10”>
</tr>
</table>
<center>
<table cellpadding=“0” cellspacing="" border=“3” id=“listticker”>
</tr>
<?php
while($hasil = mysql_fetch_array($query_ticker))
{
$antrino = $hasil[‘antrino’];
$nama = $hasil[‘nama’];
$nip = $hasil[‘nip’];
$jenis = $hasil[‘jenis’];
$status = $hasil[‘status’];
echo “<tr >
<td>$antrino</td>
<td>$nama</td>
<td>$nip</td>
<td>$jenis</td>
<td>$status</td>
</tr>”;
}
?>
</body>
</html>
Thanks
Sahman
sahman_dede@yahoo.com
please email me if you would like.