2
I have a colorbox
on the page that makes the user password change, it works normally, but I do not know why sometimes the Google Chrome of some bug and does not perform this change, as an example I tried to change the password of the same user on Google Chrome (anonymous mode) and Google Chrome Canary (anonymous mode).
Canary did not execute the change, in which no return of ok message or error, already in Google Chrome changed.
Sometimes the cache cleaning on other machines that also give this problem, solves, but it is not always, and the user have to be cleaning at all times the cache is something degrading.
Script of colorbox
:
$(document).ready(function() {
$("form[name='formulario']").validate({
// Especifica as regras da validação
rules: {
senha_1: {
required: true,
minlength: 5
},
senha_2: {
required: true,
minlength: 5,
equalTo: "#senha_1"
}
},
messages: {
senha_1: {
required: "<?=TXT_VALIDATE_MSG_SENHA?>",
minlength: "<?=TXT_VALIDATE_MSG_SENHA?>"
},
senha_2: {
required: "<?=TXT_VALIDATE_MSG_REPITASENHA?>",
minlength: "<?=TXT_VALIDATE_MSG_REPITASENHA?>",
equalTo: "<?=TXT_VALIDATE_MSG_SENHA_DIFERENTE?>"
}
},
submitHandler: function(form) {
form.submit();
parent.$.fn.colorbox.close();
parent.location = parent.location;
}
});
});
Part of POST and SESSION that runs on Submit
$idProprietario = Entrada::Int('id');
$nome = Entrada::String('nm');
$email = Entrada::String('email');
$senha = Entrada::String('senha_1');
////////////////////////////////////////////
////////////////////////////////////////////
// UPDATE //
if ($conexao->consulta("UPDATE proprietario SET senha = '".base64_encode($senha)."' WHERE idProprietario=".$idProprietario)) {
$_SESSION['msg'] = "ok|".TXT_ACAO_ADMIN_SENHA_ALTERADA;
} else {
$_SESSION['msg'] = "erro|".TXT_ACAO_CADASTRO_ERRO_SQL;
}
Put the code, if possible some image of the error, it is clearer to be able to understand the problem.
– Bulfaitelo
I put the code
– João Victor
This error usually happens after some kind of change in the
js
?– Bulfaitelo
I changed it for you to see in this specific case what I was moving, this error it gives in a very random way, sometimes closing the browser and opening again right or entering another window. I don’t know how the error is generated. The only thing I could verify is that when.
– João Victor
These functions js you call it in what part of the page ? no
header
or below thebody
?– Bulfaitelo
It is the following, has a page that shows the users linked to that loguin, and in front of each user has a password change icon that opens the colorbox modal, the call is inside the tag tbody which has a ref link in which it leads to another . php
– João Victor