Questions tagged [ajax]

AJAX (Asynchronous JavaScript and XML) is a technique for creating seamless interactive websites via asynchronous data exchange between client and server. AJAX facilitates communication with the server or partial page updates without a traditional page refresh.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

How to use Ajax on Laravel?

I made a JavaScript code to process my request search request using Ajax. So thus, my code is defined as the following: if(document.getElementById('category')){ document.getElementById('category')...
0
votes
1answer
32 views

jQuery click event does not fire function the way it should

There is a great chat example on css-tricks that I think is great for beginners in PHP. (https://css-tricks.com/jquery-php-chat/) As I'm looking at it, I notice there is no send button. This is pretty ...
0
votes
1answer
17 views

How to Image Crop And upload to Folder And Save Name in database Using Ajax And Jquery In Php

I want to crop And rezize Image and Upload In Folder For user registration and profile updations.Upload and Crop Image using PHP and jQuery. HTML Form with Image Upload Option with JQuery Croppie ...
0
votes
0answers
17 views

Datatables(): ordering + pagination with Ajax + Mysql

I am struggling with Datatables() using AJAX to pull data from a MySQL table running my PHP script. I understand that Datatables() comes with several features including sorting, pagination, etc, all ...
0
votes
0answers
11 views

java.io.IOException: Broken pipe on Ajax Request - Do we always suppress this “harmless” Web App error?

On rare occasions we get the following error in our Production Web app running on Tomcat 8 and written in Spring/SpringMVC with Ajax requests from JS: Caused by: java.io.IOException: Broken pipe ...
0
votes
0answers
10 views

Croppie.js Image cropper adding rotate function

I am using croppie.js library for cropping the images. But some of the image when selected appears inverted. I want to add an onclick rotate function which would rotate the image when the button is ...
-2
votes
0answers
22 views

Display json response in codeigniter view as a table [on hold]

I have this on my controller public function view_scholars() { $query['scholars'] = $this->Home_model->view_scholars(); $response['Error'] = FALSE; $response['Message'] = $query; ...
1
vote
1answer
13 views

Datatable datepicker format

I have a problem with multiple filtering on column start date of my table. This column is filled with row data formatted as ('dd-mm-yy'). I apply this format to my datepicker but when it try to ...
0
votes
1answer
20 views

AJAX success not render properly since second request

I use ajax to render output to below HTML element. <p class="result-box" id="result-box">The result is : <br><strong id="result"></strong></p> Everything works fine ...
0
votes
0answers
7 views

How to Add Image in database using ajax in mvc?

I m new to model view controller so seniors please help me in this topic. i have to add Fname,Mname,Lname and Image in database using ajax in mvc so here's my code. Index.cshtml <script> $(...
0
votes
0answers
10 views

AJAX Load PHP-File INTO Div Multiple Times

I'm trying to load PHP-files into a DIV through a simpe click-navigation with AJAX. When I click on #button-1 'content-1.php' is loaded inside .container - which is great. But then, when I click on #...
0
votes
1answer
10 views

Problem with asynchronous code returning wrong variable

I'm new to coding using AJAX, and cannot understand why the following asynchronous function which uses a callback will not work properly. The variable PC is global, and set to PC = 666 for tests. PC ...
0
votes
0answers
16 views

Uploading images from react-native to laravel REST API

I'm using EXPO-CLI's image picker for uploading images and got them to render client sided but now trying to send them to my Laravel REST API and move them to a folder. The problem is, laravel isn't ...
0
votes
1answer
27 views

How to store data from ajax with webapp2(python)

I want to receive data from ajax, but I got "None" as my variable I have tried print("a") in the post function and it worked, so the function is being used when I post with ajax. I also tried self....
0
votes
2answers
30 views

Dynamic appendChild inside AJAX success

I am new to web development. I have rendered text from ajax success function. I would like to add canvas under each text line. Inside AJAX success, I tried below two, texts are rendered ...
0
votes
0answers
29 views

AJAX POST from Dropdown selection in codeigniter

I'm working on a project that is needed to post from Ajax when the client make a selection, my code was working in the beginning but I'm not sure if did something wrong in the process and it stopped ...
0
votes
3answers
32 views

Passing Variable with JavaScript Ajax jQuery to PHP

Hi guys first of all thats my first try asa Programmer i hope u can understand my sometimes sutpid questions and help me out :) I searched the the advised questions and my code seems to be correct ...
0
votes
0answers
41 views

Ajax POST error when updating file metadata in SharePoint online using REST API

I am successfully able to upload text file to SharePoint online from my external web application by using POST with jQuery Ajax REST API... however i have to immediately update metadata for the file ...
-1
votes
0answers
33 views

How to create Category and subcategory of products? [on hold]

I don't know how will I create category and subcategory in my e-commerce project .. Please anyone suggest me!!
-1
votes
0answers
12 views

Jquery Datatable Serverside pagination and column filtering explanation

I am trying to use server side pagination and column filtering. For that i have gone through a lots of tutorial and documentation but still i am not able to understand fully. How can i achieve server ...
-1
votes
1answer
31 views

i have a problem with ajax When the data is returned

I get the following error when I send information to the server and try to find it in json: SyntaxError: Unexpected token in SON at position 0 jq is: $.ajaxSetup({ dataType:"json", ...
0
votes
1answer
18 views

send another data with formData using Ajax

I've tried using append to my formData, it did not send anything to db including the content of the file. here is my code:- $('#upload_csv').on("submit", function(e){ var data = new ...
0
votes
1answer
17 views

Scrolling to the bottom of a div after the first call of Setinterval()

I made a comment section with a fixed height and overflow-y: scroll and I want to load there some comments with a setInterval function. The problem with my code is, that every second the ...
3
votes
5answers
46 views

Ajax call on textarea change, but not on every change

I'm making a kind of note system for my users in Laravel application. I want this textarea that the user writes their notes on to be saved after the user is done typing, instead of running the ajax ...
0
votes
0answers
16 views

AJAX and head/foot updates best practice

A standard setup for me is to have a head.inc and a foot.inc and then everything in-between is updated via AJAX calls with some transition. Getting a bit boring but that's currently how it is. The ...
1
vote
4answers
41 views

How to get redirected to other html file on success ajax response

I need your help on how to get redirected to other html file on success ajax response in the javascript. Below is my code where i am getting the successful ajax response in jsonvariable. I have ...
-2
votes
1answer
21 views

how to loop N lines of textarea using jquery

I have a script that takes the emails from text area an send it with ajax to send.php page, it's work with me when i'm send all of the text area content of if i send line by line, now i'm need to get ...
0
votes
2answers
34 views

How can I extract number value from responseText property?

I'm having trouble with simple Ajax / JavaScript / PHP. I am using Ajax to call a PHP script that generates a random number. I have managed successfully to call a script and to show that random ...
2
votes
1answer
27 views

How to fix: 'TypeError: expected string or bytes-like object' when doing unit test on a views.py function

I'm writing a test for a function that returns a JSONResponse. The function works fine on the website but the test always raises a TypeError. It looks like the program fails to get an entry from the ...
-1
votes
1answer
31 views

Alert work on chrome but not working on firefox

I tried to make an alert. it work on chrome but not working when i try in firefox. This is my html that trigger the function: <button type="button" class="btn btn-primary" id="btn_submit">...
1
vote
2answers
28 views

How to write an AJAX call to get an XML file?

I need to write a web page with a button “Get Flight Information”. When the user clicks this button, write an AJAX call to get the XML file that you wrote in Question 1, parse the XML into a ...
0
votes
1answer
16 views

Bootstrap 4 Modal Is Not Closing When Loaded the Content via .load()

I have this Bootstrap 4 modal, which I load the body content externally via .load(). But it's not closing when I click on the close buttons. Any assistance you can provide would be greatly appreciated....
0
votes
0answers
11 views

how do I get my controller data to my view so javascript can use it?

I'm new to laravel. I have a controller that should pass an array to the view. public function php() { $NewGetGSResults = $this->GetGSResults(); $dataRes = $NewGetGSResults = $...
0
votes
0answers
19 views

laravel html dynamic form with two select boxes where select two is depend on select one

I need an HTML dynamic form where I can add multiple table fields with two select boxes. Select box two however, depends on select box one. I wrote JQuery code for that which is working fine for first ...
0
votes
0answers
27 views

Downloading a s3 bucket object using the url

I have an application file in a s3 bucket. I want to when I visit my webpage, it will download the object in the s3 bucket, using the url. I am using axios, but open to other ideas at this point. I ...
-1
votes
0answers
21 views

show errors in ajax calls

I was using ajax to call a php script to retrieve data from a database and when I ran it I was not getting any output. I used Firefox's "Inspect Element" tool and when to the Network tab and found ...
1
vote
1answer
21 views

Using PUT method AJAX results in empty $request->all() array in Laravel 6

I have a very simple form for testing purposes, when I try to PUT the formData using $.ajax I get a empty array response but this happen only when I use PUT method, if I use POST instead of PUT method ...
-2
votes
0answers
26 views

How do i change a picture using Javascript and Ajax? [on hold]

I have four folders which all have photos in them. I want to be able to go into one of these folders depending on what the user chooses and then display a picture corresponding with what the user has ...
0
votes
0answers
24 views

Is there any way i can access my APIKEY which is in the .env file using javascript

I am consuming an Api and i dont want my API KEY to be exposed to users so i was wondering if there is any way that i can access the key from the .env file using javascript At this point i had ...
0
votes
0answers
11 views

Google Drive API returning unexpected results on resumable upload

I'm trying to follow Google's documentation for Google Drive API interaction, specifically to perform a resumable upload. I want to be able to upload larger 50MB+ image files, as well as modify the ...
0
votes
0answers
10 views

Adding rawColumns shows error in yajra datatable in Laravel 5.6

I am using laravel 5.6. I am facing error when I use rawColumns . But it works sometimes then shows error. "exception": "Symfony\Component\HttpKernel\Exception\NotFoundHttpException", Here is my ...
0
votes
0answers
9 views

How to send modelattribute in AJAX without using form tag in Spring MVC

I tried to make ajax post request, it works, but spring mvc's @ModelAttribute value is empty. But it must be the same as field with id "searchString". I used debug and it shows me i got empty string ...
0
votes
1answer
31 views

Condition for Insert data into database table

New to Js and stuck here. What should I put into my if statement to insert data into database table? Because right now I do get intended error message when I submit a wrong value but it still inserts ...
0
votes
1answer
16 views

Ajax and Python - How to deal with request timeout

I have a little django project that creates a XLSX report using XlsxWriter getting records from a database using the following "pseudo" python code: global myWorkbook myWorkbook = Workbook("my_report....
1
vote
2answers
50 views

jQuery AJAX post is changing characters in post data

I'm using jQuery post to post checkbox values to another file, I know the page works and the logic is correct because when I'm not using jQuery post the page works fine, problem is it seems to mess ...
0
votes
0answers
29 views

Ajax call produces undefined path

I am having trouble figuring out why an ajax call i'm making to retrieve a Json file isn't working. I know this question has been asked a lot but it seems that none of the answers were able to help me,...
0
votes
0answers
22 views

Laravel ajax request on two tables

I am trying to implement search/autocomplete with ajax. The basic idea is once the record is found on one table you click on it and data from another table is displayed which is related to parent ...
1
vote
0answers
30 views

How to get data for a sample of images on a page?

I have a few images displayed as a basic slider. I'd like to retrieve some text related to the currently displayed image (#current_item img) At the moment i thought about sending a request to the ...
0
votes
1answer
38 views

Vue: child component won't change after receiving props from parents

So I have a problem with parent-child component communication with vue. The thing is, after i navigate to a component, it should call an ajax to get data from the server. After receiving the data, the ...
-1
votes
0answers
14 views

After I successfully edited data using php ajax and mysqli, the “<select></select>” and “datepicker” and etc. is broken

After I successfully edited the data using php ajax and mysqli, the "<select></select>" and "datepicker" and etc. is broken what I mean is that, after I click "update" button and ...