Category : ajax

This is my script and it is between head and body element <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).on(‘click’, ‘.delete’, function() { var data = $(this).attr("id"); if (confirm("Are you sure delete this data If yes then click’ok’")) { $.ajax({ url: "delete_data.php", method: "post", data: { data: data }, success: function(data) { $(‘#success’).addClass("alert alert-success"); $(‘#success’).text("data deleted successfully"); $(‘#success’).fadeOut(3000); getData(); ..

Read more

I have data like this one. kode explanation 082.B.2 Test1 083.B.3 Test2 Here is my function: public function selectprogram(Request $req) { if ($req->ajax()) { $search = $req->get(‘q’); $page = $req->get(‘page’); $resultCount = 10; $offset = ($page – 1) * $resultCount; $data = Refprogram::where(‘kode_program’,’LIKE’,’%’.$search .’%’) ->orWhere(‘uraian’,’LIKE’,’%’.$search.’%’) ->orderby(‘kode_program’) ->skip($offset) ->take($resultCount) ->get([‘kode_program’,DB::raw("CONCAT(kode_program,’ – ‘, uraian) AS text")]); $count ..

Read more

in the console showing an error message on function that jquery.min.js:2 Uncaught TypeError: Cannot set property ‘onchange’ of undefined at HTMLDocument. $(document).ready(function() { function change() { var form = this.form, Name_of_comp = form.elements.Name_of_comp, crr = $(‘.p1’).hide(), icss = $(‘.p2’).hide(); if (Name_of_comp.value == ‘Capacitor’) { crr.show(); } else if (Name_of_comp.value == ‘Resistors’) { crr.show(); } else ..

Read more