Category : ajax

i want to change the data on my table (i’m use Datatable) when i choose the number on combobox. and this my controller : public function tampilDasawisma(Request $request){ $rt = $request->rt; $dasawisma = DB::table(‘tb_dasawisma’) ->select(‘*’) ->where(‘rt’,$rt); return datatables()->of($dasawisma) ->addIndexColumn() ->addColumn(‘jumlahKeluarga’, function($row){ $jumlahKeluarga = $row->jumlahKeluarga; return $jumlahKeluarga; }) ->rawColumns([‘jumlahKeluarga’]) ->addColumn(‘action’, function($row){ $action = ‘<a href="/tampildetailDasawisma/’.$row->idDasawisma.’" class="btn ..

Read more

I am using jQuery Validator for validations. But for number or digits only validation not working. Here is code : $.validator.addMethod("Length", function(value, element) { // var password_regex = this.optional(element) || /^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[@$!%*?&])[[email protected]$!%*?&]{6,}$/.test(value); if ($(element).val() != ” && $(element).val().length !== 20) { return false; } return true; }, "Please enter exact 20 digit."); $("#add_form_id").validate({ rules: { rational_id: ..

Read more

I am using jQuery Validator for validations. However for number or digits only the validation not working. It is accepting special characters also. Instead of letters and special characters I want only digits. $.validator.addMethod("Length", function(value, element) { // var password_regex = this.optional(element) || /^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[@$!%*?&])[[email protected]$!%*?&]{6,}$/.test(value); if ($(element).val() != ” && $(element).val().length !== 20) { return false; ..

Read more

hii guys i have question like i have multiselect checkbox dropdown in value fetch using append but when i page refresh then default select "client Level" not working can you suggest how to do it? here is my code $("#emaillocation-"+splitData[1]).empty(); $("#emaillocation-"+splitData[1]).append(‘<option value="{{$client->id}}"> {{$client->name}} </option>’).attr("checked","checked").trigger(‘change’); $("#emaillocation-"+splitData[1]).multiSelect(‘refresh’); Sourc..

Read more

previously I have successfully sent data using ajax. and I have a select input that automatically fetches data from the database that has been sent using ajax. for the first time it worked, but when I gave a script to check whether the data in the database was duplicated or not. select input does not ..

Read more

I am working on drag and drop file upload and getting a 422 error when passing data to the controller. The code seems okay but there are still errors. Is it related to the file type? $(document).ready(function() { $(‘.file_drag_area’).on(‘dragover’, function() { $(this).addClass(‘file_drag_over’); return false; }); $(‘.file_drag_area’).on(‘dragleave’, function() { $(this).removeClass(‘file_drag_over’); return false; }); $(‘.file_drag_area’).on(‘drop’, function(e) { ..

Read more

I want to pass this using ajax to controller but getting this error. Console log for the responseText and get html code. Trying to figure out what does this mean? Javascript: // gathering the form data var ajaxData = new FormData( form ); if( droppedFiles ) { Array.prototype.forEach.call( droppedFiles, function( file ) { ajaxData.append( input.getAttribute( ..

Read more

Очень нужна помощь, сейчас у меня открываются категории продуктов через ajax и работает пагинация всех продуктов через ajax, как мне исправить код, чтобы при переходе в категорию работала пагинация по продуктам этой категории? Используя данный код, при открытии определённой категории товаров и нажатии на какую-нибудь страницу срабатывает пагинация ПО ВСЕМ продуктам, а не по продуктам ..

Read more

Bagaimana cara mengirim data dari array ke controller pada sebuah php? aku sudah mencoba menggunakan ajax. tapi hasil mengeluarkan ErrorException Undefined index: genres. This My Js function publish(){ var genres = ["Romance", "Drama", "History"]; $.ajax({ type: "POST", url: "/admin/movies/stores", dataType:"json", data: {‘genres’ : JSON.stringify(genres)}, contentType: "json", }); } this my controller public function store(Request $request){ ..

Read more

I want save product details with crop images. in my form, there are multirow like description[] row. form data with data: new FormData(this) is working, and crop images working separately but are not working together. I want it together. please help me @csrf <input type="text" name="product" value="Product"> <input type="text" name="description[]" value="Decripe"> <input type="file" name="upload_product_image" id="upload_image" ..

Read more