Код динамически добавляет входные данные и заполняет их, но в новой Mozilla входные данные добавляются, но не заполняют их.
На изображении показано, как все входные данные заполняются и заполняются на рабочем компьютере с Windows 7. На другом снимке показаны пустые входные данные из кода, работающего в новой Mozilla.

image

.
Это мой код index.php:
Код: Выделить всё
Count Months
//Fill each Input with Expense Name example: Water, electricity I want to Add Expense Id Hidden
function FillupInputs(inputs_counter,name) {
//read yearmonth and populate inputs
$('#yearmonth').val(document.getElementById("datepicker2").value);
for (let i = 0; i < inputs_counter; i++) {
$('input[name="expense_select[]"]').eq(i).val(id_yearmonths[i]);
$("#datepicker2").prop("readonly", true);
//Disable Input datepicker2
$("#datepicker2").attr('disabled', !$("#datepicker2").attr('disabled'));
$("#datepicker2").removeClass("grey");
}
}
//Get Number of Month Expenses and Expenses Name
function myFunction_debt(office_id){
$.ajax({
//Call php to get Expense Id and Name
url: 'librerias/php/count_month.php',
type: 'POST',
dataType: 'json',
data:{office_id:office_id},
success: function(data)
{
//Call function to Add Number Inputs
Add_Inputs(data.quantity);
//fill Inputs with expenses Name and Id
alert("Months: "+data.quantity);
FillupInputs(data.quantity,data.office_id,data.yearmonthd);
},
error: function(errorThrown)
{
alert(errorThrown);
}
});
}
//Call DinamyInputsdebt.php for Creating Inputs according expenses number
function Add_Inputs(quantity) {
$('#head').text('Months (Uncheck If you want):');
for (let i = 0; i < quantity; i++) {
$("").load("DinamyInputsdebt.php", function() {
$("#YearMonthsInputs").append($(this).html());
});
}
}
//Fill each Input with Expense Name example: Water, electricity I want to Add Expense Id Hidden
function FillupInputs(quantity,office_id,yearmonthd) {
for (let i = 0; i < quantity; i++) {
//populate Inputs with office_id id, yearmonthd en checkbox
$('input[name="expense_select[]"]').eq(i).val(yearmonthd[i]);
$('input[name="yearmonthd[]"]').eq(i).val(yearmonthd[i]);
$('input[name="office_id[]"]').eq(i).val(office_id[i]);
$("#datepicker2").removeClass("grey");
}
}
Get Months
Select office:
Select Ofic.
Process
Мобильная версия