skip to Main Content

Nested JSON data via AJAX with jquery but getting undefined value – Jquery ajax

Javascript JSON Web Inspect I have got an error message. Uncaught ReferenceError: products is not defined. $(document).ready(function(){ $("div").on("click", "a", function(){ var delivery_id = $(this).attr("id"); $.ajax({ url:"http://localhost:8888/dashboard/fetch_edit.php", method:"POST", data:{products:products},} }); }); JSON { "id": "2", "send_id": "10", "tracking_id": "TI-000000010", "user_id": "10",…

VIEW QUESTION

i want to insert data into database directly from a table (view) but when i click add btn only the first or the last row get insterted – Jquery ajax

here in this code i have passed the hardcoded value of month if i remove january it accepts december i.e last row how to solve this issue controller public function storeLeave(Request $request){ $admin= new Admin(); $admin->employee_name=$request->input('employee_name'); $admin->month=$request->input('month_JANUARY'); $admin->earned_leave=$request->input('earned_leave_JANUARY'); $admin->casual_leave=$request->input('casual_leave_JANUARY'); $admin->sick_leave=$request->input('sick_leave_JANUARY');…

VIEW QUESTION
Back To Top
Search