Category : jquery

I am using http://www.daterangepicker.com/#usage package and currently facing some difficulties in clearing the selection. Based on the documentation, there is a clear option but it doesn’t work/cleared after I click to apply button. This is the codes: $(function() { $(‘input[name="datefilter"]’).daterangepicker({ autoUpdateInput: false, locale: { cancelLabel: ‘Clear’ } }); $(‘input[name="datefilter"]’).on(‘apply.daterangepicker’, function(ev, picker) { $(this).val(picker.startDate.format(‘MM/DD/YYYY’) + ‘ ..

Read more

I am using lightgallery in my project and installed the package with the npm command and after that, I have imported package files(JS & CSS) in an app.js file like this: import lightGallery from ‘lightgallery’; import lgThumbnail from ‘lightgallery/plugins/thumbnail’; import lgZoom from ‘lightgallery/plugins/zoom’; Now I have created div in <div id="inline-gallery-container" class="inline-gallery-container"></div> in dashboard.blade.php file. ..

Read more

I am new to Laravel and ajax and I am trying to apply Custom filters on Table data. I have followed this tutorial https://www.youtube.com/watch?v=XmUH049dk9I but unfortunately it’s not working. I have used yajra data tables. Here is my controller code. <?php namespace AppHttpControllers; use IlluminateHttpRequest; use DB; class CustomSearchController extends Controller { function index(Request $request) ..

Read more

I’m working on a B2B ordering app and was using simple select/dropdowns to provide products to order and adding additional lines with jquery as needed – all working perfectly. I’ve now changed the select to select2 to provide searching. The first item works correctly, but if you add an additional line, it provides the select2 ..

Read more

I’m new to Jquery. I’m building a project with Laravel 7.28. I want users to crop an image before upload. I’ve searched on the net but all examples upload the image right after cropping. But I want the user to crop but not upload. I want users to upload the cropped image with input fields. ..

Read more

I have the following HTML : <div class="row"> <div class="col-12"> <div class="card mb-4"> <div class="card-body"> <h5 class="mb-4">Projet</h5> <form id="projetform" method="post" action="ajout_projet" class="myForms" enctype="multipart/form-data"> {{ csrf_field() }} <input type="hidden" id="id_hidden" name="id_projet" /> <div class="form-group"> <label for="inputAddress">Numéro de projet</label> <input type="text" class="form-control" id="numero_projet" name="numero_projet" placeholder="Description"> </div> <div class="form-row"> <div class="form-group col-md-6"> <label for="inputState">Client</label> <select id="id_client" class="form-control" name="id_client"> ..

Read more

I am trying to make a simple data filter in Laravel using jQuery AJAX. In my blade I am doing something like this. ***********collegelist.blade.php************ @foreach($results as $result) showing $result values @endforeach Ajax code $(‘.filter_type :checkbox’).on(‘change’,function() { if($(this).is(‘:checked’)){ var college_type=$(this).val(); alert(college_type); $.ajax({ url:’/collegeListing/public/collegeList/{college_type}/{city}’, type:’get’, data:{college_type:college_type,city:’All Cities’}, success(data){ return data; }, }); } }); And my controller ..

Read more

I’m trying to do a real-time search bar for my products list but I keep getting in my consol Uncaught ReferenceError: data is not defined at HTMLInputElement.<anonymous> (produits:243) at HTMLDocument.dispatch (jquery-2.2.4.min.js:3) at HTMLDocument.r.handle (jquery-2.2.4.min.js:3) I want to display the products without refreshing the page that’s why I used ajax, but since I only used it ..

Read more

Here i have search filter for web app, which take filter data and send it to controller method and controller do the filtering and redirect the page different one within controller. But this way it does not redirect to the result page. here’s the jquery script function searchFilterData() { item = {}; item.property_type = $(‘input[name=button-group]:checked’).val(); ..

Read more

I want to create a survey app for my client for this I select surveyjs library to build the app. I have created all tables like Survey, Questions, Answers, and Options now I want to pass dynamics questions and answers from database like public function my_survey($slug) { $surveys = Survey::where(‘slug’,$slug)->first(); $questions = Question::where(‘survey_id’,$surveys->id)->with(‘answers’)->get(); return view(‘user.my-survey’, ..

Read more

I managed to dynamically add input fields using this code : My HTML : <div class="row"> <div class="col-12"> <div class="card mb-4 form_field_outer "> <div class="card-body form_field_outer_row "> <form> <div class="form-row"> <div class="form-group col-md-4"> <label for="inputState">Casting</label> <select id="id_casting" class="form-control" name="id_casting"> <option selected>Choose…</option> @foreach($castings as $casting) <option data-id="{{$casting->id_casting}}" value="{{$casting->id_casting}}">{{$casting->nom.’ ‘.$casting->prenom}}</option> @endforeach </select> </div> <div class="form-group col-md-4"> <label ..

Read more

I’m trying to pass a variable from Controller to blade view. So there is my Controller : public function index_ajout_projet() { $clients = Client::whereIn(‘id_filiale’,[0, Auth::user()->id_filiale])->get(); $agences_conseil = AgenceConseil::all(); $agences_casting = Agence_Casting::all(); return view(‘Projet.ajout_projet’, [ ‘clients’ => $clients ],[ ‘agences_conseil’ => $agences_conseil ],[‘agences_casting’=>$agences_casting]); } There is my view : <div class="form-row"> <div class="form-group col-md-6"> <label for="inputState">Agence ..

Read more

I have a cookie created in PHP with the Jquery method where the client enters a value in an input and this cookie is created with that Value while more values are created with a comma. Example Creation cookie in jquerry: <script type="text/javascript"> $(function () { $("#btnAdd").click(function () { if($(‘#addtokendelivery’).val() === ”){ alert(‘Valor en Blanco’); ..

Read more

I’m trying to add dynamically input fields using jquery. So I have the following code My HTML code : <div class="col-12 col-md-12 col-xl-8 col-left"> <div class="card mb-4 "> <div class="card-body "> <button type="button" class="btn btn-outline-primary mb-1 add_new_frm_field_btn">Ajouter un nouveau casting</button> </br> </br> <div class="row"> <div class="col-12"> <div class="card mb-4 form_field_outer "> <div class="card-body form_field_outer_row "> ..

Read more

iam doing a project in php. i need to integrate simplyfy payment gate way in my project what i did is based on this documentation – https://www.simplify.com/commerce/docs/tutorial/index i worked step 1 i have added a form to get debit card details like below <!– <h1>Charge $10 with Simplify Commerce</h1> –> <form id="simplify-payment-form" action="" method="POST"> <!– ..

Read more

I have ajax in blade calling from my controller, the json output correctly using API, but the output not display anything on my console. I’ve watched all tutorials but all the same. Am i missing something here? :/ Route:- Route::get(‘/itemDetails/{item_id}’, ‘[email protected]’)->name(‘itemDetails’); Controller:- public function itemDetails($item_id) { $item = Items::where(‘id’, $item_id)->first(); $theArray=[ ‘name’=>$item->name, ‘id’=>$item->id, ‘priceNotFormated’=>$item->price, ‘price’=>@money($item->price, ..

Read more