Quantcast
Channel: Code and Programming » Search Results » table
Viewing all articles
Browse latest Browse all 10

diaporama image

$
0
0

i did this code:

<!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>
<script src=”http://code.jquery.com/jquery-1.8.2.js”></script>
<script src=”http://code.jquery.com/ui/1.9.1/jquery-ui.js”></script>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
</head>
<script>
setInterval(function(){chrono(‘t’);},1000);
</script>
<?php
include(‘function.php’);
session_start();
global $list;
$list= captcha_list($_SESSION['id']);
global $i;
$i=0;
?>

<script>
function chrono(id){
inte= parseInt(document.getElementById(id).innerHTML,10);

switch(inte)
{
case 0:
document.getElementById(id).innerHTML=’7′;

break;
case 1:
document.getElementById(id).innerHTML=’0′;
document.getElementById(‘im’).src=”<?php echo $list[$i]['captcha'];?>” ;

break;
case 2:
document.getElementById(id).innerHTML=’1′;

break;
case 3:
document.getElementById(id).innerHTML=’2′;
break;
case 4:
document.getElementById(id).innerHTML=’3′;
break;
case 5:
document.getElementById(id).innerHTML=’4′;
break;
case 5:
document.getElementById(id).innerHTML=’4′;
break;
case 6:
document.getElementById(id).innerHTML=’5′;
break;
case 7:
document.getElementById(id).innerHTML=’6′;
<?php $i++; ?>

break;
default:
break;
}

};
</script>
<body style=”background-image:url(paper_03.png)” >

<form name=”form_2″ style=”background-image:url(paper_02.png);position: absolute; top:30px; left: 200px; width: 500px; height: 500px;” >
<CENTER>
<table style=”position: relative; top:30px;” >
<tr><td colspan=4><label>Image will be refresh in <label id=”t” name=”t”> 7 </label> seconds
</label></td><td></td></tr>
<tr><td height=200px ><label>Image </label></td><td></td><td height=200px colspan=2><input type=”image” id=”im” src=”<?php echo $list[$i]['captcha'];?>” style=” height=150px” /> </td></tr>
<tr><td height=200px><label>Text </label></td><td colspan=3 height=200px><input type=”text” name=”cap” style=”width: 400px” /> </td></tr>
<tr><td></td><td><input type=”submit” name=”answer” value=”SUBMIT ANSWER” style=”height:200%;background-image:url(paper_03.png)”/> </td><td><input type=”submit” name=”know” value=”DON’T KNOW” style=”height:200%; background-image:url(paper_03.png)”/> </td><td><input type=”submit” name=”pause” value=”SUBMIT AND PAUSE” style=”height:200%;background-image:url(paper_03.png)”/> </td>
</tr>

</table>

</CENTER>
</form>
</body>
<footer>
<?php
include(‘header_footer/footer.php’);
?>
</footer>
</html>

the problem is the first image displayed is the second one in array and the third one is never displayed.the changes is when timer=7 and timer=0.

  • where is the error?
  • what is it cause?
  • how can i fix it?

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles



Latest Images