Category : jquery

I have table <thead> initialized in in blade and foreach loop for <tbody> in controller so this is how it looks in controller: foreach($data as $row) { $output .= ‘ <tr> <td>’.$row->year.'</td> <td> <a href={{url(/edit/’.$row->id.’)}} class="…">Edit</a> <a href="#" class="…">Delete</a> </td> </tr> ‘; } and in the blade, initialized like this: <table> <thead> <tr> <th>Year</th> <th> ..

Read more

i am using Laravel 8 and I am using built in Auth module. I am login with mobile using ajax request. When user login and page redirct i get error /undefined route. I attach screen shoot of error. My ajax code is, $.ajax({ type: "POST", url: "/login", headers: { ‘X-CSRF-TOKEN’: $(‘meta[name="csrf-token"]’).attr(‘content’) }, data: { ‘mobile’ ..

Read more

I’m trying to use select2 retrieving large data in my dropdown. Getting 500 Internal Server Error in my console log. I have store token in HTML meta tag. <meta name="csrf-token" content="{{ csrf_token() }}"> And sending a token as a parameter in my POST request. var CSRF_TOKEN = $(‘meta[name=”csrf-token”]’).attr(‘content’); $(document).ready(function(){ $( “#test” ).select2({ ajax: { url: ..

Read more

Used select2 library in laravel framework for auto search on select box. My Select Box code is below, <div class="col-lg-4 col-md-6 mb-3" id="zipblock"> <select class="form-control" id="contactzipcode" name=’contactzipcode’ disabled> <option value=”>–Zip Code–</option> @if(isset($zips)) @foreach ($zips as $zipnew) <option value="{{ $zipnew->zip_id }}" {{( isset($zip_id) && $zipnew->zip_id == $zip_id) ? ‘selected’ : ” }}>{{ $zipnew->zip_code }}</option> @endforeach @endif ..

Read more

In my Laravel 8 / jQuery 3.5.1 / bootstrap 4.5.3 app I want to add jQuery-File-Upload library and adding all files to my project I got error Uncaught TypeError: $(…).fileupload is not a function At line with fileupload calling: <div class="col-xs-12 col-sm-6"> <input id="fileupload" type="file" class="ad_image_fileupload" name="files[]" > </div> @section(‘scripts’) <link href="{{ asset(‘css/gijgo.min.css’) }}" rel="stylesheet" ..

Read more

Index.blade.php <!– START: modal[AllData]–> <div class="modal fade" id="getTransferOperationData" role="dialog"> <div class="modal__content modal__content–xl p-10 text-left" style="width: auto; margin: 15px;"> <button type="button" class="btn btn-default close" data-dismiss="modal" aria-label="Close" style="float: right; /*border: 1px solid #ccc*/"> <span style="font-weight:bold; color: red">Kapat</span> </button> <div class="mt-20"> <p> ….. </p> </div> </div> </div> <!– END: modal[AllData]–> I want to show all data on modal ..

Read more

Im using simple ajax get method on local machine that providing to empty function in my server-side laraver code and observe from browser network that resoponse coming randomly from 250-500ms. Cant get any similar problem(if it’s a problem at all), isn’t it a lot response for nothing? And if it normal, why response varies between ..

Read more

Hei i am confused to get file from jquery files on edit… when my file on exiting server, i store my files on files plugin… But i cannot get the file.. when i submit it just get null, using command laravel dd($request->file(‘files’)) $(document).ready(function() { $(‘#filer_input’).filer({ limit: 3, maxSize: 3, extensions: [“jpg”, “jpeg”, “png”, “gif”, “txt”, ..

Read more

so I have table in sql with 20 columns and I need one column to get the sum of other two columns, the data is showing in modal-fade dialog this is how it look like div id="show" class="modal fade" role="dialog"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title"></h4> </div> <div ..

Read more

I have Session::flash notifications(bootstrap toasts), which is used to notify about adding a product to the cart: @if(Session::has(‘add-product’)) <div aria-live="polite" aria-atomic="true" class="d-flex justify-content-center align-items-center"> <div class="toast fixed-top" role="alert" aria-live="assertive" aria-atomic="true" data-delay="3000"> <div class="toast-header bg-success"> <span class="mr-auto notif_text"></span> <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> </div> </div> @endif CartController with Session:flash: public ..

Read more

I’m trying to send data to controller using ajax and I’m getting The POST method is not supported for this route. Supported methods: GET, HEAD. Can someone please tell me what am I doing wrong? In web.php Route::post(‘/fb’, ‘[email protected]’)->name(‘fb’); HTML: <form method="POST" id="formfb" enctype="multipart/form-data" data-route="{{ route(‘fb’) }}"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <button id="fbbutton" ..

Read more

I found a cool library for pop up notifications on jQuery + Bootstrap bootstrap-growl. I want to use it exclusively for adding a product to the cart. I tried to put a handler on a button click, but the notification looks like this: Product <strong>{{ Session::get(‘add-product’) }}</strong> added to cart Curly braces are not processed. ..

Read more

Hey guys i work with laravel and im trying to change the default large size pizza price to small price when click on dropdown item. Ive tried something but couldnt figure it out. Html code: @foreach($product as $p) <div class="col-lg-3 text-center portfolio-item {{$p->category_id}} "> <div class="card bg-transparent " style="width: 14rem;"> <img class="card-img-top" src="{{asset(‘front/’)}}/assets/img/1.png" alt="Card image ..

Read more

I am trying to display value using autocomplete but it shows first alphabet. Like, A for Admin. What did I miss in code ? Please help. var path = "{{ route(‘search’) }}"; $(‘input.customer_id’).typeahead({ source: function(query, process) { return $.get(path, { query: query }, function(data) { console.log(process(data)); return process(data); }); }, }); <div class="form-group row"> <label ..

Read more

I was watching tutorial on how to display MySQL data in dynamic window then I realized its not for laravel i hope there is a why to use it on laravel. this is the script used to display the data into html format <script> $(document).ready(function(){ $(‘.view_data’).click(function(){ var student_id = $($this).attr("id"); $.ajax({ url:select.php, method:"post", data:{student_id:student_id}, success:function(data){ ..

Read more