115 lines
3.5 KiB
JavaScript
115 lines
3.5 KiB
JavaScript
//<script language="Javascript">
|
||
|
||
var arSigneErreurLayers = new Array();
|
||
arSigneErreurLayers[0]='erreur';
|
||
arSigneErreurLayers[1]='ErrGuichet';
|
||
arSigneErreurLayers[2]='ErrEmail';
|
||
|
||
var arNameOfTextBox = new Array();
|
||
arNameOfTextBox[0]='';
|
||
arNameOfTextBox[1]='txt_guichet';
|
||
arNameOfTextBox[2]='txt_email';
|
||
arNameOfTextBox[3]='lst_Vecteur';
|
||
|
||
function disabledInput(indice) {
|
||
var oInput;
|
||
|
||
switch (indice) {
|
||
case 0 :
|
||
oInput=MM_findObj(arNameOfTextBox[1]);
|
||
oInput.setAttribute('disabled','disabled');
|
||
oInput.value="";
|
||
oInput=MM_findObj(arNameOfTextBox[2]);
|
||
oInput.setAttribute('disabled','disabled');
|
||
oInput.value="";
|
||
oInput=MM_findObj(arNameOfTextBox[3]);
|
||
oInput.removeAttribute('disabled');
|
||
break;
|
||
case 1 :
|
||
oInput=MM_findObj(arNameOfTextBox[indice]);
|
||
oInput.removeAttribute('disabled');
|
||
oInput=MM_findObj(arNameOfTextBox[2]);
|
||
oInput.setAttribute('disabled','disabled');
|
||
oInput.value="";
|
||
oInput=MM_findObj(arNameOfTextBox[3]);
|
||
oInput.removeAttribute('disabled');
|
||
break;
|
||
case 2 :
|
||
oInput=MM_findObj(arNameOfTextBox[indice]);
|
||
oInput.removeAttribute('disabled');
|
||
oInput=MM_findObj(arNameOfTextBox[1]);
|
||
oInput.setAttribute('disabled','disabled');
|
||
oInput.value="";
|
||
oInput=MM_findObj(arNameOfTextBox[3]);
|
||
oInput.selectedIndex = 1;
|
||
oInput.setAttribute('disabled','disabled');
|
||
break;
|
||
}
|
||
}
|
||
|
||
function validRequest(objLink,sPathWay){
|
||
var sDiv, oInput, sURL, bFlag, iPosition;
|
||
|
||
MM_showHideLayers('',arSigneErreurLayers);
|
||
oInput=MM_findObj('txt_refint');
|
||
sURL = sPathWay + 'module.asp?mod=LS&RefClient=' + oInput.value;
|
||
sDiv='<div class="clErreur">' ;
|
||
iPosition=0;
|
||
bFlag = false;
|
||
while (iPosition<window.document.frmForm1.chk_dest.length & !bFlag) {
|
||
if (window.document.frmForm1.chk_dest[iPosition++].checked) bFlag=true;
|
||
}
|
||
if (! bFlag) {
|
||
return false;
|
||
}
|
||
|
||
switch (iPosition) {
|
||
case 1 :
|
||
break;
|
||
case 2 :
|
||
oInput=MM_findObj(arNameOfTextBox[1]);
|
||
if ((oInput.value=='') || (! bCheckCdGuichet(oInput.value))) {
|
||
MM_setTextOfLayer('erreur','',sDiv + aErreur['LS07'] + "</div>")
|
||
MM_showHideLayers('',arSigneErreurLayers,'erreur','ErrGuichet');
|
||
return false;
|
||
}
|
||
sURL+= '&Guichet=' + oInput.value;
|
||
break;
|
||
case 3 :
|
||
oInput=MM_findObj(arNameOfTextBox[2]);
|
||
if ((oInput.value=='') || (! bCheckEmail(oInput.value))) {
|
||
MM_setTextOfLayer('erreur','',sDiv + aErreur['LS08'] + "</div>")
|
||
MM_showHideLayers('',arSigneErreurLayers,'erreur','ErrEmail');
|
||
return false;
|
||
}
|
||
sURL+= '&Email=' + oInput.value;
|
||
break;
|
||
}
|
||
|
||
oInput=MM_findObj('lst_Vecteur');
|
||
sURL += '&Vecteur=' + oInput.options[oInput.selectedIndex].value;
|
||
oInput=MM_findObj('lst_Alerte');
|
||
sURL += '&Alerte=' + oInput.options[oInput.selectedIndex].value;
|
||
oInput=MM_findObj('lst_Tri');
|
||
sURL += '&Tri=' + oInput.options[oInput.selectedIndex].value;
|
||
objLink.href = sURL;
|
||
|
||
}
|
||
|
||
// Fonction permettant de g<>n<EFBFBD>rer l'URL pour les interrogations "pr<70>c<EFBFBD>dent" et "suivant"
|
||
// pour le module LS
|
||
function requestBDFLS(sGuichet, sEmail, sVecteur, sService, sTriliste, sIndpps, objLink) {
|
||
var sURL='';
|
||
|
||
sURL = '?Mod=LS';
|
||
sURL = sURL + '&RefClient=' + window.sClientRef;
|
||
sURL = sURL + '&Guichet=' + ToQueryString(sGuichet)
|
||
+ '&Email=' + ToQueryString(sEmail)
|
||
+ '&Vecteur=' + ToQueryString(sVecteur)
|
||
+ '&Alerte=' + ToQueryString(sService)
|
||
+ '&Tri=' + ToQueryString(sTriliste)
|
||
+ '&Indpps=' + ToQueryString(sIndpps);
|
||
|
||
sURL = cstRoot + '/Modules/Module.asp' + sURL;
|
||
objLink.href = sURL;
|
||
} |