merci d'aoir me repondre
mais il y erreur
Parse error: parse error, expecting `','' or `';'' in d:\documents and settings\command\four.php on line 104
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<html>
<head>
<title>Listes Liees +four+prod</title>
<script type='text/javascript'>
function getXhr(){
var xhr = null;
if(window.XMLHttpRequest)// Firefox et autres
xhr = new XMLHttpRequest();
elseif(window.ActiveXObject){// Internet Explorer
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e){
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
}
else{// XMLHttpRequest non supporté par le navigateur
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
xhr = false;
}
return xhr;
}
/**
* Méthode qui sera appelée sur le click du bouton
*/
function go(){
var xhr = getXhr();
// On défini ce qu'on va faire quand on aura la réponse
xhr.onreadystatechange = function(){
// On ne fait quelque chose que si on a tout reçu et que le serveur est ok
if(xhr.readyState == 4 && xhr.status == 200){
leselect = xhr.responseText;
// On se sert de innerHTML pour rajouter les options a la liste
document.getElementById('prod').innerHTML = leselect;
}
}
// Ici on va voir comment faire du post
xhr.open("POST","prod.php",true);
// ne pas oublier ça pour le post
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
// ne pas oublier de poster les arguments
// ici, l'id de four
sel = document.getElementById('four');
idfour = sel.options[sel.selectedIndex].value;
xhr.send("idfour="+idfour);
}
</script>
</head>
<body>
<style>
<!--
td{font-family:verdana,sans-serif; font-size:8pt;color:#333333};
body{font-family:verdana,sans-serif; font-size:11pt;color:#333333;font-weight:bold};
//-->
</style>
</head>
<body bgcolor="#eeeedd">
<center>
<p>quel produits et quelle clientes voulez vous choisir?</p>
<form>
<tr><td>
<label>Fournisseurs :</label>
<td>
<?
mysql_connect("localhost","root","");
mysql_select_db("Command");
$res = mysql_query("SELECT * FROM fournisseur ORDER BY nomfour");
echo "><select name='four' id='four' onchange='go()'>
<option value='-1'>Aucun</option>
</tr>";
while($row = mysql_fetch_assoc($res)){
echo "<option value='".$row["idfour"]."'>".$row["nomfour"]."</option>";
}
echo "</select>";
?>
<br>
<br>
<tr><td>
<label>Produits :</label>
<td><div id='prod' style='display:inline'>
<select name='prod'>
<option value='-1'>Choisir un produit</option>
</tr>
</select>
<br>
<p>
<tr><td>
<label>Localisation :</label>
<td>
<?
mysql_connect("localhost","root","");
mysql_select_db("Command");
$res = mysql_query("SELECT Distinct Localisation FROM client ");
echo"<select name="Nom" id="client">";
while($row = mysql_fetch_assoc($res)){
echo "<option value='".$row["Localisation"]."'>".$row["Localisation"]."</option>";
}
echo "</select> ";
?>
</tr>
<br>
<p>
<tr><td>
<label>Localisation :</label>
<td>
<?
mysql_connect("localhost","root","");
mysql_select_db("Command");
$res = mysql_query("SELECT Distinct SortClt FROM client ");
echo"<select name="Nom" id="client">";
while($row = mysql_fetch_assoc($res)){
echo "<option value='".$row["SortClt"]."'>".$row["SortClt"]."</option>";
}
echo "</select> ";
?>
</tr>
</select>
</div>
</form>
</body>
</html>