All Questions
Tagged with laravel-5.8 ajax
41 questions
2
votes
1
answer
581
views
Get files from FormData object in laravel 5.8 sent over via Axios in Vue
I have a Laravel & Vue application where I want to upload files along with other data via axios but when I send the form, I do not see the files there in laravel.
Here is my HTML form:
<form @...
0
votes
2
answers
210
views
Parameter is not sent to Laravel route in Ajax
I'm working with Laravel 5.8 and I wanted to apply a discount code system for my site.
So I tried sending data with Ajax like this:
$.ajax({
type: 'POST',
url: baseurl + 'discount/register',
...
1
vote
1
answer
645
views
JQuery multiply input values of table rows in AJAX
I want to calculate each row's total price by multiplying individual row's inputs and then finally calculate a grand total by adding all the total values of the Total column using JQuery. I am only ...
1
vote
1
answer
1k
views
How do I change the total price when the quantity changes in ajax?
I used the append function of jquery to transfer value to other side. so i append input type number which the value automatically equal to 1.
The question if I increment the value of input type number ...
1
vote
0
answers
719
views
Laravel 5.8.38 Error 419 Token Mismatch only on production server in Firefox Only
I got some problem on my laravel website but only on Firefox when already on production, it works fine on chrome even new edge.
On Chrome and Edge will be return (200) my dd($request->all()); So i ...
1
vote
1
answer
14k
views
ReferenceError: formData is not defined
I am writing a unit testing code for the Ajax and Laravel project. I am trying to test one function.
<script>
$(document).ready(function () {
$('#postAdd').click(function(e){
...
0
votes
1
answer
555
views
Laravel 5.8 Dynamic Dependant Select Dropdowns
I want to get subcategories of current category using JQuery Ajax for creating posts.
It doesn't work for me but when i change the URL on browser like this http://127.0.0.1:8000/back/posts/create/json-...
0
votes
0
answers
149
views
Undefined offset:0 at HandleExceptions->handleError
I have a page which is used to search the users. If I searched an existing user, the page will redirect to my wanted page. If the user is not existing, a message must be shown. But for me the message ...
0
votes
3
answers
557
views
Laravel 5.8 JSON Response With So Many Whitespace
Every time I do an ajax request the Laravel always return the JSON response with so many whitespaces in front of the response text so the response always executed in error, not in the success section ...
0
votes
1
answer
115
views
Jquery data.success is not working with laravel 5.8
I am sending data through ajax to controller and return a json response, but when i am trying to perform action using response it's not working.
Jquery code
$.ajax({headers: {
'X-CSRF-TOKEN':...
0
votes
1
answer
2k
views
Laravel 5.8 file upload using PUT method with ajax
I'm trying to update a file using a PUT method with ajax. For whatever reason I can't send a request in my controller. I created a custom validator to check whether a file is missing or a certain ...
1
vote
0
answers
386
views
Laravel Pagination with ajax+jQuery not working
I was trying to use ajax and jQuery for one of my projects layout. I took help from some online sites to learn how to that. But even though I am doing what those resources did, somehow my ajax and ...
1
vote
1
answer
607
views
CSRF Token Mismatch Laravel 5..8
I"m having an issue that I don't know why it's showing this error. I have a form that's getting posted via ajax. I've added the hidden field meta tag in the head of my view. When I execute my ajax ...
0
votes
2
answers
43
views
I need the data ,according to the type I send
My view blade that displays the data of all types but I need the specific type only, where i send it by ajax: "{{ route('taxonomies.json',type) }}".How do I send the type that I want from the given ...
0
votes
2
answers
188
views
Passing data from view to controller using Ajax in Laravel
I am trying to pass two variables to my controller using ajax. There are no errors but the data is null when I get it in the controller.
Web.php
Route::get('/donate/select-card', 'CardController@...
2
votes
0
answers
272
views
Laravel/Ajax passing data to controller: data is null
I am trying to pass two variables to my controller using ajax. There are no errors but the data is null when I get it in the controller.
Web.php
Route::get('/donate/select-card', 'CardController@...
2
votes
2
answers
3k
views
Laravel - 500 (Internal Server Error) on Ajax Call
I've been trying on this tutorial (https://www.youtube.com/watch?time_continue=7&v=D4ny-CboZC0) with respect to my context and I'm getting this error:
POST http://127.0.0.1:8000/transactions/...
0
votes
2
answers
330
views
Through Ajax price data comes to form input text, but not the selected product's price, instead only the first price is always brought
I have prepared a Sales recording form whereby you first select the product/stock_name. Once this selection is made it should populate a field called unit_selling price below with that product's/stock'...
1
vote
1
answer
202
views
incorrect ajax url to controller function in Laravel framework
I want a correct ajax URL this one is not working. I am getting this in the console:
GET XHR localhost:8000/Controller/getUnitSellingPrice [HTTP/1.0 404
Not Found 203ms]
create.blade View
C:\...
0
votes
0
answers
302
views
AJAX Request not working in Laravel 5.8.33
I am trying to make a dependent select field but When I select the first field Nothing happen to the other field. I think the ajax code is not working because I use an alert in the starting of the ...
2
votes
2
answers
3k
views
Auto refresh an another page when new data is added Laravel 5.8 Ajax
I've been searching and trying on how to refresh an another page or blade file when a data is updated. In my case, whenever I click the Call Next button in my call.blade.php, the data would update or ...
0
votes
2
answers
62
views
How to avoid user navigate to ajax url in laravel 5.8?
I have created simple web application with laravel 5.8.
this is my project url http://localhost/test/public/home
web.php
Route::group(['middleware' => ['auth', 'preventBackHistory']], function() ...
0
votes
1
answer
4k
views
How to fix 'Failed to load resource: the server responded with a status of 500 (Internal Server Error)' when i used fetch
i used fetch function to make dynamic selection from my database user. When i click, the ajax didn't work.
Failed to load resource: the server responded with a status of 500
(Internal Server ...
1
vote
1
answer
80
views
Need Help Looping Out Content Of Json Data Response Fetched From DB In Using Ajax And Laravel
I have a table with a list of subjects, each subject has its own topics, so I wrote an ajax script to fetch the topics of each subject "onclick" of the subject, using the subject id.
I tried console ...
-1
votes
2
answers
970
views
Laravel ajax form call jQuery function
I'm starting to learn Laravel, first time and first project.
I have my custom login form working, but want to improve it, ajax request works fine, but can't call a JS function. The documentation of ...
0
votes
1
answer
506
views
How to upload PDF in simple (without FormData) Ajax with other fields
I want one Ajax form for uploading applicant details (Name, Email, Number, Resume file). Although the path of the file is going to the Controller, it's not acceptable as a request for a file.
...
0
votes
1
answer
924
views
JavaScript AJAX Fetch API and Laravel 5.8 pointing to wrong URL (route)
I was wondering that the AJAX response points to this URL http://www.inwrite.com/turtle/admin/login. I double-checked and didn't change the routes in my web.php file. It took me three days to catch ...
0
votes
1
answer
121
views
Append a dynamic select box to a div after button click
I am trying to append an accordion div after a button click. That works fine. But inside the appended div I have a select box , that has to be dynamically populated. After getting the Json results I ...
-2
votes
2
answers
94
views
Ajax is not sending the image
i'm submitting a form in which some of inputs and a input of image and sending it through ajax FormData all the text data is properly submit and in controller i can see it using dd() but no data is ...
0
votes
2
answers
60
views
Result appended twice to table ajax
I am tring to append data to a table. But one of my result is repeating twice. Below is my json response I got.
groupname […]
0 {…}
survey_id 2
group_name DEMO
1 {…}
survey_id 1
...
1
vote
2
answers
785
views
Append image to table from ajax result laravel
I am tring to append an image to table but whenever I give src path , it doesnt display any result.
if(data ){
txt += '<tr><td>'+data.groupname[i].group_name+'</td><td ...
0
votes
1
answer
1k
views
Display response json messages in a div using jquery in laravel
I have a form to change my password. I need to display error messages in a div.
The response that I am getting from controller is as follows
{"errors":{"current_password":"validation.reset....
0
votes
1
answer
90
views
Display JSON result in table Laravel 5.8
I want to display the JSON results to my HTML table in Laravel 5.8.
The result returned from the controller is as follows.
[[{"logged_on":"2019-06-24 00:00:00"},{"logged_on":"2019-06-21 00:00:00"}]]
...
1
vote
0
answers
194
views
Laravel 5.8 Pure Javascript Fetch AJAX PromiseStatus returns rejected
Currently, I'm having an issue regarding the AJAX response of retrieving an existing customer. When I access the dashboard using the same account in different browsers, for instance: http://www....
0
votes
1
answer
45
views
Dropdown results based on selection from previous dropdown
I need some help to get more values on this dropdown filter.
I got 3 dropdowns, the first give me all "companies", the second, will show all "blocks" of that company, and the last one, will give me ...
0
votes
1
answer
42
views
Image is not being uploaded on server
I am using Laravel 5.8 for uploading the file on the server through ajax but don't understand what's going wrong. All the other data are being sent except the input file.
hasFile() method always ...
0
votes
0
answers
36
views
I have Problem in Ajax request in Laravel, post request does not work
I have a problem in ajax request in laravel 5.8
The problem
POST http://dailyshop.test/ajaxRequest 419 (unknown status)
The route
Route::get('ajaxRequest', 'FrontEndController@ajaxRequest');
...
1
vote
1
answer
3k
views
Chunk upload does not work with large files - Laravel 5.8
I need to upload large files to my site, and to do this, I used the Dropzone JS, with pion/laravel-chunk-upload, I do not understand, everything is good and true, but although this, any upload for ...
0
votes
2
answers
1k
views
laravel 5.8 responding with 500 internal server error on ajax request
I'm trying to send a array to mine controller to save in the data base if in this case I make the array a string it will save into the data base.
so when data: {'mapData' : arrayAllDrawings}, it ...
9
votes
4
answers
31k
views
The GET method is not supported for this route. Supported methods: POST. laravel 5.8 Ajax
I am trying to understand more about how to save data from ajax request into the database on laravel, The data in this case is raw (JSON FORMATTED) data just to see how it works it works fine if I ...
1
vote
0
answers
375
views
Laravel5.8 jQuery post request saying its a get route
In the html there a button so when you click it it goes toward an .post jQuery request goes to an controller that has to handle the request and then returning success json back, but I get an error (...