1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
| <html>
<head>
<style>
.red {background-color:white}
.blue {background-color:blue}
.black{background-color:black}
.tab{cursor:crosshair }
.option{checked:checked}
</style>
<script>
var lastTr;
function blok(objet, id_objet){
objet.className="option"
if(lastTr)lastTr.className="red"
objet.className="blue"
lastTr=objet;
document.getElementById(id_objet).checked = true;
}
function ouvrirFenetre(id,url){
var URL = url + "?id=" + id ;
window.open(URL,"PopUp",'width=500,height=350,location=yes,status=no,toolbar=no,scrollbars=no');
}
</script>
</head>
<body>
<?php
if (!empty($_POST)) {
$id=@$_POST['a'];
if (isset($_POST['maj'])) {
echo '<script>ouvrirFenetre('.$id.',"popeffet.php")</script>';
//echo 'ok';
} elseif (isset($_POST['change'])) {
//echo 'no';
echo '<script>ouvrirFenetre('.$id.',"popeffet2.php")</script>';
} elseif (isset($_POST['modif'])) {
// par défaut, c'est le bouton 1, même si on ne clique pas/
//echo 'okno';
echo '<script>ouvrirFenetre('.$id.',"popeffet3.php")</script>';
}
}
?>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
<?php
echo'<table width="70%" border="1">';
for($i=1;$i<5;$i++){
echo'<tr class="white" onClick="blok(this,\'radio' . $i . '\')"><td><input type="radio" id="radio' . $i . '" name="a" value="'.$i.'"></td><td>'.$i.'</td><td>bleu</td></tr>';
}
echo '</table>';
?>
<input type="submit" name="maj" value="MAJ">
<input type="submit" name="change" value="CHANGER">
<input type="submit" name="modif" value="MODIFIER">
</form>
</body>
</html> |
Partager