: Uncaught TypeError: $(…).datetimepicker is not a function http://127.0.0.1:8000/formfinance/payments/Add:331 jQuery 2 Add:331:35 Uncaught ReferenceError: fetchPaymentDetails is not defined onchange http://127.0.0.1:8000/formfinance/payments/Add:1
$(function() {$(‘#datetimepicker3’).datetimepicker({format: ‘LT’});});$(document).ready(function() {$(‘#customer_id’).change(function() {fetchPaymentDetails();});function fetch Payment Details() {let customerId = $(‘#customer_id’).val();if (customerId) {$.ajax({url: ‘/handle-input’,method: ‘POST’,contentType: ‘application/json’,headers: {‘X-CSRF-TOKEN’: $(‘meta[name=”csrf-token”]’).attr(‘content’)},data: JSON.stringify({ customer_id: customerId }),success: function(data) {console.log(data,’Success:’);if (data.success) {populateBookingDetails(data.bookingDetails);} else {console.error(‘Error:’, data.message);}},error: function(error) {console.error(‘Error:’, error);}});}}function populateBookingDetails(details) {$(‘#name’).val(details.name || ”);$(‘#room_type’).val(12);$(‘#total_numbers’).val(details.total_numbers || ”);$(‘#date’).val(details.date || ”);$(‘#time’).val(details.time || ”);$(‘#arrival_date’).val(details.arrival_date || ”);$(‘#depature_date’).val(details.depature_date || ”);$(‘#email’).val(details.email || ”);$(‘#phone_number’).val(details.ph_number || ”);$(‘#status’).val(details.status || ”);}}); my expected response is’nt working
kalit jibril is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.