Bonjour,
Y a t-il une solution pour enchainer plusieur combo (qui vont chercher les données avec un lien ODBC dans une base SQL, ceci ca fonctionne impecable).
Mon problème, je n'arrive pas à garder la valeur de la combo précédente (j' y arrive que sur les 2 premières) tout en restant sur la même page.
Au depart, seul la première combo est visible (normal car les autres se remplissent dynamiquement et avec une requet SQL à chacque fois).
A la fin, lors de la selection de la dernière combo on remplit le tableau suivant).
Mon language est l'asp et l'asp.net (ce code doit être compatible IE6 et Netscape 6).

Je joint le code si cela peut être utile.
<% Option Explicit
Dim Req
Dim NumSite
%>
<!-- Connexion à la base de donnée -->
<!--#include file="../../../../../connexion_maps02/Conn_maps02.asp"-->
<!--#include file="../../../../../connexion_maps02/adovbs.inc"-->
<script language="javascript">
function Site()
{
Site = document.FormAjout.ComboSite.value;
NumSite = document.FormAjout.ComboSite.value;
document.general.cache.value = Site;
document.general.submit();
}
</script>
<html>
<body>
<form method="POST" name="FormAjout" action="conditions.asp">
<table border="0" width="234" height="48">
<%
'on récupére toutes les sites
Set req= Conn_maps02.Execute("SELECT distinct nom_etablissement from ba_af_profil")
NumSite = Request.Form("Cache")
%>
<tr>
<td align="right" width="32" height="44" bgcolor="#33CC33"> Site : </td>
<td width="95" height="44" bgcolor="#33CC33">
<p align="left">
<select onchange="Site()" name="ComboSite">
<option value="Rien">Choisir Site</option>
<%
'TQ non fin RS
do while not req.eof
Response.write "<OPTION Value="
' récup premier champ
Response.write req(0)
if NumSite=Req(0) then
response.write " SELECTED "
end if
Response.write ">"
Response.write req(0)
Response.write "</option>"
Response.write vbcrlf
req.MoveNext
loop
%>
</select></td>
<%
If NumSite <> "" then
'requete pour les login
Set req = Conn_maps02.execute("SELECT distinct login, libelle, id_profil from ba_af_profil WHERE nom_etablissement ='" & NumSite & "' ")
%>
<td width="42" height="44" bgcolor="#66FF66"><p align="right">Login :</td>
<td width="47" height="44" bgcolor="#66FF66"><p align="left">
<SELECT Name="ComboLogin">
<option value="Rien">Choisir Login</option>
<%
'TQ non fin RS
do while not req.eof
Response.write "<OPTION Value="
' récup premier champ
Response.write req(2)
Response.write ">"
Response.write req(0) & " => " & req(1) & " (n° du profile = " & req(2) & ")."
Response.write "</option>"
Response.write vbcrlf
req.MoveNext
loop
req.Close
%>
</select>
</td>
</tr>
<% end if %>
</table>
</form>
<FORM method="POST" name="general" action="conditions.asp">
<input type="text" name="cache" size="20">
</form>
<form method="get" name="resultat" >
<script language="javascript">
function Donnees()
{
alert(document.getElementById(ComboSite).options[document.getElementById(ComboSite).selectedIndex].value);
}
</script>
<tr>
</tr>
<button name="B1"><span lang="fr">Données</span></button>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-right-style: solid; border-right-width: 1; border-top-width: 0; border-bottom-style: solid; border-bottom-width: 0; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" bordercolor="#111111" width="1110" id="AutoNumber1">
<tr>
<td width="321" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top: 1px solid #111111; border-bottom-style: none; border-bottom-width: medium" colspan="5" align="center">
<span lang="fr">Paramétrage Roulement</span></td>
<td width="5" style="border-top: medium none #111111; border-bottom-style: none; border-bottom-width: medium" align="center" bgcolor="#CCCCCC">
<p align="left"> </td>
<td width="291" style="border-top-color: #111111; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium" align="center" colspan="5">
<span lang="fr">Paramétrage Rame</span></td>
<td width="17" style="border-top: medium none #111111; border-bottom-style: none; border-bottom-width: medium" bgcolor="#CCCCCC"> </td>
<td width="382" style="border-top-color: #111111; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium" colspan="4" align="center">
<span lang="fr">Paramétrage immobilisation</span></td>
</tr>
<tr>
<td width="57" style="border-left-color: #111111; border-left-width: 1; border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Rlt</span></td>
<td width="57" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Consul - tation</span></td>
<td width="57" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Prévision</span></td>
<td width="57" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Affec -tation</span></td>
<td width="57" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Casse Cycle</span></td>
<td width="5" style="border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" bgcolor="#CCCCCC"> </td>
<td width="51" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Rame</span></td>
<td width="42" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Série</span></td>
<td width="59" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Consul - tation</span></td>
<td width="56" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Prévision</span></td>
<td width="47" style="border-top-style: none; border-top-width: medium">
<p align="center"><span lang="fr">Affec -tation</span></td>
<td width="17" bgcolor="#CCCCCC" style="border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium"> </td>
<td width="64" align="center" style="border-top-style: none; border-top-width: medium">
<span lang="fr">N° chantier</span></td>
<td width="202" align="center" style="border-top-style: none; border-top-width: medium">
<span lang="fr">Nom Chantier</span></td>
<td width="54" align="center" style="border-top-style: none; border-top-width: medium">
<span lang="fr">Controle</span></td>
<td width="85" align="center" style="border-top-style: none; border-top-width: medium">
<span lang="fr">Création</span></td>
</tr>
<!-- Mise en mémoire des entêtes sur le serveur -->
<tr>
<td width="57" style="border-left-color: #111111; border-left-width: 1; border-top-style: none; border-top-width: medium; border-bottom-color: #111111; border-bottom-width: 1"> </td>
<td width="57" style="border-top-style: none; border-top-width: medium; border-bottom-color: #111111; border-bottom-width: 1"> </td>
<td width="57" style="border-top-style: none; border-top-width: medium; border-bottom-color: #111111; border-bottom-width: 1"> </td>
<td width="57" style="border-top-style: none; border-top-width: medium; border-bottom-color: #111111; border-bottom-width: 1"> </td>
<td width="57" style="border-top-style: none; border-top-width: medium; border-bottom-color: #111111; border-bottom-width: 1"> </td>
<td width="5" bgcolor="#CCCCCC" style="border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium"> </td>
<td width="51" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="42" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="59" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="56" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="47" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="17" bgcolor="#CCCCCC" style="border-top-style: none; border-top-width: medium; border-bottom: medium none #111111"> </td>
<td width="64" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="202" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="54" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
<td width="85" style="border-bottom-color: #111111; border-bottom-width: 1; border-top-style:none; border-top-width:medium"> </td>
</tr>
</table>
</form>
</body>
<%Conn_maps02.close%></html>
Merci d'avance pour votre aide.