PHP
- 3 ответа
- 0 вопросов
2
Вклад в тег
$('#NewsCreatorForm').submit(function() {
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
url: "/engine/queryforms/postnews.php",
dataType: 'json',
data: formData,
processData: false,
contentType: false,
success: function(data)
{
if(data.result == 'success') {
$('#NewsCreatorSuccessModal').modal('show');
setTimeout(function(){document.location="/admin/news/"}, 1000);
} else {
for(var errorField in data.texterror){
document.getElementById('errortext').innerHTML = data.texterror[errorField];
$('#NewsCreatorErrorModal').modal('show');
}
}
}
});
return false;
});
<input type="hidden" name="idfilm" value="'.$cow['idfilm'].'">
setInterval(() =>{
todo.querySelectorAll(".todo__block").forEach((item, i) => {
//todoArray.forEach(it =>{
// console.log(item.querySelector(`#timer_${i}`));
// console.log(it.date);
// setTimer(item.querySelector(`#timer_${i}`), date.value);
//});
setTimer(item.querySelector(`#timer_${i}`), todoArray[i].date);
})
}, 1000);