46 lines
1.4 KiB
JavaScript
46 lines
1.4 KiB
JavaScript
|
/* ----------------------------------------------------------------------
|
||
|
15.10.2022
|
||
|
Селект
|
||
|
---------------------------------------------------------------------- */
|
||
|
$("#sel-children-city").chained("#sel-parent-region");
|
||
|
|
||
|
|
||
|
function showErrEmail(data){
|
||
|
if (data=="3")
|
||
|
$("#showErrEmail").removeClass("hidden");
|
||
|
else
|
||
|
$("#showErrEmail").addClass("hidden");
|
||
|
}
|
||
|
|
||
|
$("#inputEmailAddress").keyup(function(event) {
|
||
|
var email = $(this).val();
|
||
|
$.ajax({
|
||
|
type: 'POST', // Тип запроса^M
|
||
|
url: '/act/login', // Скрипт обработчика^M
|
||
|
data: "act=checkEmail&email=" + email, // Данные которые мы передаем^M
|
||
|
success: function(data) {
|
||
|
showErrEmail(data);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
})
|
||
|
|
||
|
|
||
|
/* ----------------------------------------------------------------------
|
||
|
15.10.2022
|
||
|
Проверка валидности паролей
|
||
|
---------------------------------------------------------------------- */
|
||
|
function showErrPass(data){
|
||
|
if (data=="1")
|
||
|
$("#showErrPass").removeClass("hidden");
|
||
|
else
|
||
|
$("#showErrPass").addClass("hidden");
|
||
|
}
|
||
|
$('[name=pwd], [name=pwd2]').keyup(function(event) {
|
||
|
var pwd = $("[name=pwd]").val();
|
||
|
var pwd2 = $("[name=pwd2]").val();
|
||
|
if (pwd != pwd2)
|
||
|
showErrPass("1");
|
||
|
else
|
||
|
showErrPass("0");
|
||
|
})
|