Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
3answers
25 views

Problem with route in Ajax using Laravel?

I am trying to get a list of countries with their cities using Select2 with Jquery. At the time of creating a post with their respective country and city, I don't have a problem, but at the time of ...
0
votes
0answers
11 views

SharePoint - Call external API JSON returning a PDF

Here is the problem: We have a SharePoint site that stores information from an external database (BDC). We had a group write an API for us to another system that generates a PDF based on a passed ...
0
votes
0answers
6 views

why the cascadding dropdown value doesn't appear when i try to update a row

i have a form which contains a dependent dynamic dropdown the first depend on the second and the second depend on the third. when i select the value from the dropdowns and then submit the form, ...
0
votes
1answer
23 views

How to update image with AJAX in Laravel

I'm having problems updating a record with an image. I don't know if something in my code is wrong. ProductController.php This is my controller. Here I try to delete the existing image and send the ...
0
votes
0answers
22 views

Can't receive form data in PHP of multi-file upload

I am creating a multi-file upload that passes a form data object to a php script. The form data has all the correct data in it however the $_POST and $_FILES fields are both empty if and only if I ...
0
votes
1answer
20 views

Function is not defined when the html is load from another page with ajax

I have a table in one page and i fetch with the rows of a database with ajax, i have a button and onclick he does a function named deleteRow() but when i click says that deleteRow() is not defined. ...
0
votes
1answer
23 views

From JQuery to JS variable [duplicate]

I want the array of objects result (msg) that I get from AJAX into a JS variable (allEvents) I thought it could be done like this: let allEvents; $.ajax({ method: "GET", url: "https://...
0
votes
2answers
10 views

Django: how to have dynamic values in separate javascript files?

I would like to keep the javascript logic in separate files from the Django templates. However, some of the logic contains dynamic values which I would like to still be rendered just like templates. ...
0
votes
0answers
38 views

Adding javascript function inside a php function

I got a html table filled with data from db. When i click on the table i need to call the below script that will get the data from the clicked table row and pass it on a form which is present on ...
-3
votes
0answers
21 views

How to make on('click') event work several times, but not just one

So I have a problem with on('click') event. I put an event on four different button to start an ajax request. After I clicked once on one of these buttons, the other three become inactive. I found ...
1
vote
1answer
21 views

How to delete image with ajax in laravel

I am trying to delete a record from my products table, each product has an image. I don't know how to delete the image from the file where it is stored. Product.js $(document).ready(function() { ...
0
votes
0answers
11 views

Is it possible to fetch specific columns from postgreSQL table using AJAX get calls

I'm using an ember-js application, where I need to fetch data from a PostgreSQL database using AJAX calls. Is it possible to fetch only the required columns from the table instead of fetching all the ...
0
votes
1answer
18 views

Filter Json data in Html datatables and Django

I added a Datatable to a page of my Django project. This tables is supposed to show some data retrieved from a Django Rest Framework API endpoint. Here is how a sample of the data retrieved looks ...
0
votes
0answers
13 views

Row Not Retrieving For Dynamic Dropdown

File 1 : getUnit.php <?php include "config.php"; $unitid = $_POST['unit']; $sql = "Select up.unit_teachingperiodid ,u.unitname, tp.teachingperiodname , tp.teachingperiodyear from teachingperiod ...
0
votes
0answers
6 views

Couldn't add variable into ajax data using jquery for node server

I am new to AJAX jquery node express. I want to send geolocation through ajax to my node server. Can i do that? or not through ajax? Is there any other way around? I have read the grammar of json, ...
-2
votes
0answers
16 views

Ajax fonction to get a value Jquery

i got a problem with retrieving a result of my ajax function. I used twice (my code is too big to show it where) this ajax function the same request, everything. the first time it works well, the ...
0
votes
0answers
22 views

File Uploaded Despite Having Code to Eliminate Same Files ASP.NET

I have a code that accepts file upload, download, delete to the Google Drive. Basically, if it is a same file, then the user is alerted that it is the same file. If it is a new file, it will be ...
0
votes
1answer
29 views

Ajax button not working in asp.net mvc app

I'm making an MVC ASP.NET app in C#, and I need to add a button event in order to do something. So following some tutorial I tried this in the .cshtml file: <button>Next</button> <...
0
votes
1answer
19 views

Re-render Vue component with dynamic HTML from AJAX call

I have a Vue component 'FullCart' with a default slot like so: <template> <div> <slot></slot> </div> </template> This is only used to wrap the cart of a ...
0
votes
0answers
11 views

Upload image PHP+AJAX, how add chunks

I have problem with large images upload. I am trying to write a script that will divide the file into parts and send them one by one. I do not want to use ready-made solutions. The PHP script first ...
0
votes
0answers
10 views

Button postback not working in ASP.NET update panel

I have hosted my site on IIS 8.2 I'm trying to submit a form which is in asp:UpdatePanel but my submit button is not working. I'm getting the following javascript error in chrome's debugger console. ...
0
votes
0answers
23 views

Problem with Javascript Code for Contact Form

First of all, sorry about my english, isn't my first language. My recent issue, is about a contact form that I have in website. The user can fill the form normally when click on the send button, it's ...
0
votes
0answers
9 views

Using jquery lazy load with data from Ajax call

I am trying to archive the following. Sending an ajax request to a file which request the neccessary data from the YouTube API. Create inside the Ajax request the necessary Preview-Images. Send ...
-1
votes
0answers
10 views

I have issue with data base code “ajax”: file it doesn't read

If somebody could help me I would like to use ajax file from another file, but data doesn't show. If somebody could check if that script works. And if there is possibility to take data from html file ...
1
vote
1answer
24 views

Django “Forbidden (CSRF cookie not set.)” on localhost:8000

I have a Django app running locally on 127.0.0.1:8000. When I access it via 127.0.0.1:8000 on my browser, everything is fine. However, when I access it via localhost:8000, CSRF errors occur : I think ...
0
votes
0answers
17 views

Promises Sequencing

In this function, I am trying to run 2 different ajax requests (3 options, only 2 will run depending on if statements). addDep(), and addCust() functions both have an ajax request in them and get sent ...
0
votes
0answers
29 views

Wait a while after running the modal - Jquery

I need to show a modal when a function is executed. Verify that the Modal is active. To be active I must wait 10 seconds to load the new information. This Task is cyclic and the problem I have is ...
0
votes
2answers
47 views

How to reload page without losing any inserted (div) data

i have multiple tags, which is set as editable (contentEditable="true"). is there any way to store contents in divs before load and paste the same after reload or any alternative way to do this?. I ...
-2
votes
1answer
29 views

How to pass data with data-request attribute? [on hold]

I put data-request="onDiscount" attribute in form tag. And i want when the user click on submit button run onDiscount function and pass a variable to onDiscount function. My function is executed but i ...
0
votes
1answer
27 views

Filter duplicate values in select2 ajax call

I'm using select2 load remote data way to render results (50 at a time) from an api. The response of the api might have duplicate values in any page response. I have tried formatting response but ...
0
votes
1answer
36 views

How to force download a file when get file path in ajax response

I want to download file on my server i have the following code that i tried but file is not downloading. i am merging multiple files into single file then after merger i want the result file to ...
0
votes
0answers
13 views

How to configure SOAPACTION header with an ajax request?

I've an issue using a SOAP Webservice. Basically I just want to verify some authentification information with a simple form : login / password. I create an Ajax script with jQuery to call that ...
0
votes
1answer
27 views

How to set data on an already created editor?

I want to set data to 3 nos. of already created editors which I am unable to do. I tried pt. no. 2 to set data which is happening on a newly created editor and not to the existing one. Below is ...
0
votes
1answer
35 views

How to get HTML resource of a page by php

I wanted to make my site let anyone when open internal links, the links open on the current page without opening new url in browser (something like what happens in Instagram site). For doing this I ...
0
votes
0answers
22 views

Stop JQuery slidedown being obliterated by another ajax event

I am doing a slide-down but another further ajax process from a module do a display none on that selector. How can I stop this further process to happen? function openUpIndividualFacet(key) { ...
0
votes
0answers
11 views

Unable to fire ajax request when flask app is run from windows command line, but does okay from IDE

I've recently started learning AJAX and was trying to run this code https://github.com/PrettyPrinted/AJAX_Forms_jQuery_Flask (Youtube tutorial link included in readme by the author) I'm having a ...
0
votes
0answers
24 views

modal gets closed and data is updated, but the screen appears dark

I want the table to be updated after entering the data, without the page getting refreshed. The data gets updated but after clicking save/submit button, the page appears dark. Ajax code goes here: $...
0
votes
0answers
24 views

Slick slider working fine but it stop after ajax content generated

I need help. I added Slick Slider on the cart drawer(ajax) here's the preview link. https://5z3jaet80e7ksq66-22025387.shopifypreview.com/collections/all if you click on the add to cart button you ...
-1
votes
2answers
35 views

How to send and retrieve an array from javascript through ajax

I have a 2d array in javascript, which i need to insert database so i need to send it to php via ajax. I have tried different solutions given on similar issues on stackoverflow, i was able to solve ...
0
votes
2answers
34 views

Laravel saving image in storage

my code was working fine but now it is not, as image is not saving in folder, i am trying to save image in storage folder, with id as image name. Controller: if($request->hasFile('profile_pic'))...
-2
votes
0answers
38 views

undefined index:jumlahcutisemasa. cannot save it to database

Hello everyone and greetings!. need some help on PHP HTML coding here... basically I'm working on a form..unfortunately there's one form field that cannot be saved to the MySQL database.attached ...
1
vote
0answers
11 views

Assign value to Html helper textbox from JSON

I want to assign the value of "version" retrieved via AJAX call in JSON format to the textbox, but the below code is not working. Could anyone please help me with the same. $.each(data, function (i, ...
0
votes
3answers
48 views

Error Undefined offset: 5 in multiple insert Laravel 6

I want to make a restaurant ordering system where the waiter can put more than 1 order in the food menu, I tried to make multiple inserts, but there was an error like this Undefined offset: 5 My ...
1
vote
0answers
27 views

jQuery Infinite Scroll is not working on mobile devices

I am using jQuery infinite scroll. Its working perfect on desktop but when I try it on my mobile device its not working. I am not sure but I guess there is something in the code which is not allowing ...
0
votes
0answers
17 views

Syntax for appending input value to a local JSON file via $.getJSON [duplicate]

(Request to Moderator(s): kindly allow this post as it is different from the one you indicated it is a duplicate of, as there the answer does not provide the syntax for the JavaScript code needed). I ...
0
votes
0answers
14 views

AJAX, render_template, or redirect… when should each be used?

For instance, in my website's index page, I fetch data from a database and display it in HTML. If there is any change in the database, when I use render_template("index.html"), the data is not ...
0
votes
0answers
27 views

ASP.NET Core 3 CORS Anonymous Ajax Request

Running ASP.NET Core 3 (Azure Web App) and have a CORS policy set up like so: services.AddCors(options => { options.AddPolicy("TestCors", ...
-1
votes
1answer
26 views

How to upload image to phpmyadmin database and save it to a specific username [on hold]

I am trying to upload image to phpmyadmin database and save to a specific username. After that, I want to retrieve that image and display it in the html page. I am currently using jquery , ajax , php ,...
0
votes
0answers
38 views

How to init again after ajax page change

I'm building my own web-site and i wanted in some cases to change page with an ajax call. The change itself it's working but to make the next page work properly i need to initialize again the document,...
0
votes
2answers
27 views

How to create dynamic object attributes from Ajax response in Javascript

I'm using Ajax in order to get a list of items of an inventory, I would like to have an object named inventory and then create attributes named as the items of the response, so that means if I insert ...