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
| <script language="JavaScript">
<!--
var engOk = 1;
function valider() {
<%
Participants.MoveFirst
Response.write(Participants.RecordCount)
if Participants.RecordCount>0 then
bool = False 'boolean pour alerte en cas d'indisponibilité
Redim tabIndispo(Participants.RecordCount) ' redimensionnement du tableau
indice = 0
Participants.MoveFirst
while not Participants.EOF
Response.write(Participants("Id") & vbCrLf)
if verifDispo(Participants("Id")) = False then
bool = True 'il y a au moins un participant indisponible donc alerte
end if
Participants.MoveNext
wend
if bool = True then
Nom_Utilisateurs = "["
'on regarde s'il y a des participants indisponibles dans le tableau tab_indispo
if ContientElements(tab_indispo) then
'on ajoute à la chaîne le premier utilisateur indisponible
Nom_Utilisateurs = Nom_Utilisateurs & tab_indispo(0)
'puis tous les autres séparés par un point-virgule
for i=1 to ubound(tab_indispo)
Nom_Utilisateurs = Nom_Utilisateurs & " ; " & tab_indispo(i)
next
Nom_Utilisateurs = Nom_Utilisateurs & "]" 'enfin on ferme la liste des indisponibles
%>
alert("<%Nom_Utilisateurs%> n'est ou ne sont pas disponible(s), voulez-vous quand même valider ce rendez-vous ?");
return false;
<%end if
end if
Participants.Close
end if%>
<%if len(Request("LockSelect")) = 0 then%>
Exporter();
document.Detail.submit();
<%else%>
self.close();
<%end if%>
return true;
}
// d'autres fonctions js dont Exporter() |
Partager