File "main_elo.php"
Full Path: /home/analogde/www/Freebox/CHESS_ON/main_elo.php
File size: 2.15 KB
MIME-type: text/html
Charset: 8 bit
<?php
//http://fr.openclassrooms.com/informatique/cours/ajax-et-l-echange-de-donnees-en-javascript/exemple-des-listes-liees
//http://creer-un-site.fr/liste-deroulante-liee-en-ajax-295.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=utf-8" />
<meta name="Description" content="Site perso,cours,ouvrages" />
<meta name="Keywords" content="WEBSITE perso " />
<meta name="Distribution" content="Global" />
<meta name="Robots" content="" />
<meta http-equiv="Content-Language" content="fr" />
<meta name="rating" content="general" />
<meta name="author" content="Patrice DELPY" />
<meta name="copyright" content="Copyright 2013" />
<meta name="generator" content="Patoche" />
<title>Patoche WEBSITE - 2013 - Template du site - en cours de dveloppemment ...</title>
<script type="text/javascript">
function liste()
{
var ObjListe = document.getElementById('Joueur1');
var SelIndex = ObjListe.selectedIndex;
var SelValue = ObjListe.options[ObjListe.selectedIndex].value;
var SelText = ObjListe.options[ObjListe.selectedIndex].text
alert(SelText);
}
/*var ObjListe = document.getElementById('ListeElement');
var SelIndex = ObjListe.selectedIndex;
var SelValue = ObjListe.options[ObjListe.selectedIndex].value;
var SelText = ObjListe.options[ObjListe.selectedIndex].text;
var selectElmt = document.getElementById("Joueur1");
var valeurselectionnee = selectElmt.options[selectElmt.selectedIndex].value;
var textselectionne = selectElmt.options[selectElmt.selectedIndex].text;*/
</script>
</head>
<body>
<?php
echo '
<select id="Joueur1" onchange="liste();">
<option value="valeur1">Joueur1</option>
<option value="valeur2">Joueur2</option>
<option value="valeur3">Joueur3</option>
</select>
';
echo '
<select id="Joueur 2" onchange="VerifListe();">
<option value="valeur1">Joueur1</option>
<option value="valeur2">Joueur2</option>
<option value="valeur3">Joueur3</option>
</select>
';
?>
</body>
</html>