Category : javascript

Data is generated like so: $repResults[] = [ ‘label’ => (new CarbonCarbon($wbwResult->created_at))->isoFormat(‘DD-MM-YY’), ‘data’ => [ # datatype cast to int to prevent {!! xss !!} (int) $wbwResult->discipline_three, (int) $wbwResult->discipline_four, (int) $wbwResult->discipline_five, (int) $wbwResult->discipline_six, ] ]; I am then trying to output the data as a line chart: const ctx = document.getElementById(‘myChart’).getContext(‘2d’); const myChart = new ..

Read more

I have a small slider that switches the preview image to the main image. It works fine now blade.php <div class="custom-carousel-section"> <div class="custom-container"> <div class="custom-carousel"> @if(!empty($article_block_images)) @foreach($article_block_images as $article_block_image) <div class="custom-carousel__title"> @if($loop->first) <span>{{ $article_block_image->title }}</span> @endif </div> @endforeach @endif @if(!empty($article_block_images)) @foreach($article_block_images as $article_block_image) <div class="main-image"> @if($loop->first) <img src="{{ $article_block_image->main_image }}" alt="{{ $article_block_image->image_alt }}" title="{{ $article_block_image->image_title ..

Read more

My Goal I would like to display the error messages in the form. But for this I would need to have access to the JSON? Code HTML blade <form> <input name="name"> <p class="text-red-500 text-xs italic">Please fill out this field.</p> {{– $message –}} <button id="submit">SUBMIT</button> </form> javascript <script> const submitBtn = document.getElementById(‘submit’); submitBtn.addEventListener(‘click’, (e) => { ..

Read more

Im getting internal server error 500. unfortunately there is no logs to see what causes it. here is my ajax calling it : createRide(event) { console.log(event); event.preventDefault(); event.stopPropagation(); console.log(‘Hello’, $("#form-create-ride").serialize()); $.ajax({ url: ‘/admin/dispatcher’, dataType: ‘json’, headers: {‘X-CSRF-TOKEN’: window.Laravel.csrfToken }, type: ‘POST’, data: $("#form-create-ride").serialize(), success: function(data) { console.log(‘Accept’, data); this.props.completed(data); }.bind(this) }); } this is from ..

Read more

This is the error occurs in web console: vendor.bundle.base.js:2 POST http://localhost/dashboard_new/public/addPackage 404 (Not Found) send @ vendor.bundle.base.js:2 ajax @ vendor.bundle.base.js:2 addPackage @ all_package_listing_view:522 onclick @ all_package_listing_view:361 all_package_listing_view:546 Uncaught TypeError: Cannot read properties of undefined (reading ‘errors’) at Object.error (all_package_listing_view:546) at c (vendor.bundle.base.js:2) at Object.fireWith [as rejectWith] (vendor.bundle.base.js:2) at l (vendor.bundle.base.js:2) at XMLHttpRequest.<anonymous> (vendor.bundle.base.js:2) recently I ..

Read more

I need to concatenate a json key for displaying the contents based on the current language selected. In API I am getting the response and current language selected. The response is like below { lang : "en" heading_ar: "قابل وتناول واستمتع بالاختبار الحقيقي" heading_en: "Meet, Eat & Enjoy the true test" description_ar: "<p>هناك حقيقة مثبتة ..

Read more

I’m able to do the delete method, but I’m getting 405 (Method Not Allowed) error, any idea on how to handle this error? The API was made with laravel async deletaPessoa() { await fetch("http://127.0.0.1:8000/api/pessoas/" + this.idPessoa, { method: "delete", headers: { "Content-type": "application/json" }, }) } (The command works fine, but I get this message) ..

Read more

html code like this I want to get all the values in each text area from container-body class lets assume that I have duplicate elements <div class="container-body"> <div class="p-form"> <ul class="p-formList"> <li class="p-formList__item"> <div class="p-formList__item__body"> <div class="c-input c-input–full"> <textarea type="text" class="body-text" placeholder="説明記入をお願いします" name="description" value=""> </textarea> </div> </div> </li> </ul> </div> </div> Sourc..

Read more

So I have 3 selects in a form. The form has 3 JQuery and Ajax functions set on input. One is for displaying some data of the product dinamically, the second one is because ‘width’ select data depends on the ‘model’ selection, and the last function because the ‘projection’ select depends on ‘model’ and ‘width’ ..

Read more

i have this select option <select class="form-select" aria-label="select-kondisi"> <option selected>Kondisi</option> <option value="baik">Baik</option> <option value="rusak">Rusak</option> </select> and here is my ajax $.ajax( { headers: { ‘X-CSRF-TOKEN’: $(‘meta[name="csrf-token"]’).attr(‘content’) }, url: ‘/databarang/getubah’, data: {id_barang : id_barang}, method: ‘post’, dataType: ‘json’, success: function(data){ $(‘#kondisi’).val(data.kondisi); } }); what i want is how to auto choose option from ajax with value ..

Read more

I am trying to implement large file upload with resumable.js and laravel-chunk-upload. Everything is working fine, that is I am able to upload large files properly but the problem is, if anything happens to network connection while uploading, then the uploads is not completing properly. one chunk gets error. the error is: "message": "fopen(H:CodinozDevelopmentFile ECommercedigital-product-shoppingstorageappproducts/27-09-2021 ..

Read more