A voir également:
- Tableau?
- Tableau croisé dynamique - Guide
- Tableau ascii - Guide
- Afficher un tableau en c - Forum C
- Le fichier contient une liste de prénoms. triez ce tableau par ordre alphabétique des prénoms. quel mot est formé par les 6 premières lettres de la colonne code ? - Forum Bureautique
- Tableau word - Guide
1 réponse
Pour ceux que ça interesse, j'ai trouvé une solution: je fais générer un script javascript sur mesure par de l'asp, ce qui donne:
<head>
<%
' Ouverture de la connexion bd
Dim objCommand, objRS
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnexion
objCommand.CommandType = adCmdStoredProc
objCommand.CommandText = "reqnumerocompte"
Set objRS = objCommand.Execute
Set objCommand = Nothing
objRS.MoveFirst
Dim script
script = "<script language=""JavaScript1.2"">" & _
"function libelle(compte, dc){" & _
"if (dc == ""CompteDebit"") {" & _
" switch (compte) {"
Do While not objRS.EOF
script = script & _
"case """ & objRS("NumeroCompte_com") & """: document.forIndic.LibelleDebit.value = """ & objRS("Libelle_com") & """; break; "
objRS.MoveNext
Loop
script = script & "default: break;" & _
"}" & _
"}" & _
"if (dc == ""CompteCredit"") {" & _
" switch (compte) {"
objRS.MoveFirst
Do While not objRS.EOF
script = script & _
"case """ & objRS("NumeroCompte_com") & """: document.forIndic.LibelleCredit.value = """ & objRS("Libelle_com") & """; break; "
objRS.MoveNext
Loop
script = script & "default: break;" & _
"}" & _
"}" & _
"}" & _
"</script>"
Response.Write script
objRS.MoveFirst
%>
</head>
Et voilà! ça me donne un script illisible dans ma page, mais le navigateur s'en débrouille!
<head>
<%
' Ouverture de la connexion bd
Dim objCommand, objRS
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnexion
objCommand.CommandType = adCmdStoredProc
objCommand.CommandText = "reqnumerocompte"
Set objRS = objCommand.Execute
Set objCommand = Nothing
objRS.MoveFirst
Dim script
script = "<script language=""JavaScript1.2"">" & _
"function libelle(compte, dc){" & _
"if (dc == ""CompteDebit"") {" & _
" switch (compte) {"
Do While not objRS.EOF
script = script & _
"case """ & objRS("NumeroCompte_com") & """: document.forIndic.LibelleDebit.value = """ & objRS("Libelle_com") & """; break; "
objRS.MoveNext
Loop
script = script & "default: break;" & _
"}" & _
"}" & _
"if (dc == ""CompteCredit"") {" & _
" switch (compte) {"
objRS.MoveFirst
Do While not objRS.EOF
script = script & _
"case """ & objRS("NumeroCompte_com") & """: document.forIndic.LibelleCredit.value = """ & objRS("Libelle_com") & """; break; "
objRS.MoveNext
Loop
script = script & "default: break;" & _
"}" & _
"}" & _
"}" & _
"</script>"
Response.Write script
objRS.MoveFirst
%>
</head>
Et voilà! ça me donne un script illisible dans ma page, mais le navigateur s'en débrouille!