Mise à jour dans fonction.js de la fonction connexion_cookie()
This commit is contained in:
parent
0d178676ab
commit
74bc4004da
|
|
@ -16267,12 +16267,16 @@ function raffraichier_gabarit()
|
||||||
|
|
||||||
function connexion_cookie()
|
function connexion_cookie()
|
||||||
{
|
{
|
||||||
msgErreur=$("#msgErreur").val();
|
var msgErreur = $("#msgErreur").val();
|
||||||
|
var racineWeb = $("#racineWeb").val();
|
||||||
|
|
||||||
donnees = 'msgErreur='+msgErreur;
|
// Validation des données
|
||||||
|
var donnees = {
|
||||||
|
msgErreur: msgErreur || ''
|
||||||
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: $("#racineWeb").val()+"Ajaxconnexioncookie/",
|
url: racineWeb + "Ajaxconnexioncookie/",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: donnees,
|
data: donnees,
|
||||||
success: function(data)
|
success: function(data)
|
||||||
|
|
@ -16281,17 +16285,27 @@ function connexion_cookie()
|
||||||
},
|
},
|
||||||
error: function(errorData)
|
error: function(errorData)
|
||||||
{
|
{
|
||||||
|
console.error("Erreur AJAX:", errorData);
|
||||||
},
|
},
|
||||||
complete: function()
|
complete: function()
|
||||||
{
|
{
|
||||||
var login = document.getElementById("login").value;
|
// SOLUTION: Vérifier que l'élément existe avant d'accéder à .value
|
||||||
if (login>" ")
|
var loginElement = document.getElementById("login");
|
||||||
|
var mdpElement = document.getElementById("mdp");
|
||||||
|
|
||||||
|
if (loginElement && loginElement.value && loginElement.value.trim() !== "")
|
||||||
{
|
{
|
||||||
$("#mdp").focus();
|
// Focus sur mdp si login a une valeur
|
||||||
|
if (mdpElement) {
|
||||||
|
mdpElement.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#login").focus();
|
// Focus sur login s'il existe
|
||||||
|
if (loginElement) {
|
||||||
|
loginElement.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<script src="Bootstrap/js/jquery-ui.js"></script>
|
<script src="Bootstrap/js/jquery-ui.js"></script>
|
||||||
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
||||||
<script src="Js/datepicker-fr.js"></script>
|
<script src="Js/datepicker-fr.js"></script>
|
||||||
<script src="Js/fonctions.js?ver=connexion_2025.09.25.04"></script>
|
<script src="Js/fonctions.js?ver=connexion_2025.12.10.00"></script>
|
||||||
<script src="Bootstrap/js/timer.jquery.js"></script>
|
<script src="Bootstrap/js/timer.jquery.js"></script>
|
||||||
<script src="Bootstrap/js/jquery.timer.js"></script>
|
<script src="Bootstrap/js/jquery.timer.js"></script>
|
||||||
<script src="Bootstrap/js/ajaxmask.js"></script>
|
<script src="Bootstrap/js/ajaxmask.js"></script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user