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
1answer
22 views

Disable inline editing if value is present in php

Apologies if this question has been asked previously. I am currently generating a basic table using PHP and have one cell where a user can add a comment. When the user types a comment into the ...
0
votes
0answers
19 views

Ajax call not triggering

I want to fetch the employee details for autocomplete below is my JS code, using break point I could confirm its entering the else condition, but the ajax call is not being hit. $("#EmpName")....
4
votes
3answers
17 views

ajax data.success block of code not be execute(variable value)

i have big problem in regrading ajax request .if the ajax request success i want to set variable value as 1 if not successes it remaining the as 0 .but my program is not working properly .what is ...
0
votes
1answer
17 views

Setting a Code Igniter session with ajax (Is it possible to set it without using alert?)

$.ajax({ url: '/res/createsession/' + $("#language option:selected").data('id') + '/' + $("#language option:selected").data('code'), method: 'POST', success: ...
0
votes
0answers
21 views

jQuery ajax POST Request error when sending json

Im trying to send a POST request but it returns an error XML read error: badly formed I don't know why I get this error, I'm trying to send formatted as json. Here is the code $("#dataForm").submit(...
0
votes
1answer
27 views

Button does not disabled and text value does'nt change after click

I basically have a table that have a 1-click apply button function for a job board. I wrote some ajax function code and jquery so that whenever user click on button, the button will be disabled and ...
0
votes
2answers
23 views

How to render a partial based on specific link clicked?

I'm having trouble rendering partials using Ajax/jQuery in my Rails app and am wondering where i'm going wrong. Rails 5.2.0 On my Dashboard view, i'm trying to render partials based on the specific ...
0
votes
0answers
7 views

Phonegap ajax http service connection problem

I've a problem with ajax call. I made app for android with cordova/phonegap and somewhere I call ajax with url on my test server with ip address ("http://212.245.12.135:5555/test/test.php" - onyl ...
-2
votes
0answers
32 views

how to call javascript function using ajax call

I have a javascript function, I want to call that function using ajax call how can I do that. I have tried this. my javascript function: function test(){ console.log("hello") } my ajax call: ...
-1
votes
0answers
10 views

Receive notifications when a website using javascript is updated

An iOS app that I've been using for real-time crime data near me is shutting down. The app was using this site for it's information: http://ws.ocsd.org/Blotter/BlotterSearch.aspx. I was wondering what ...
1
vote
0answers
24 views

Notice: Undefined index: fileToUpload, image [duplicate]

I have this problem, it turns out that I am working on a news portal, and I want to modify the following fields; editar-noticia.php <form class="form-horizontal" id="editar_noticia"> ...
0
votes
1answer
34 views

Trigger jQuery function on page load

I've created some jQuery that take a value from a one of several buttons and then via ajax loads the corresponding custom post types. Each button represents a category that the posts are associated ...
0
votes
0answers
37 views

Double quotes in user input causes invalid JSON

I have an application that takes a JavaScript object, turns it into a string using JSON.stringify(), and passes this string in an ajax POST request. The JavaScript object contains various data, ...
0
votes
1answer
23 views

Need to call perl script from javascript

I have written a perl script I can access from a URL: https://hostname/myweb/myScript.pl?id=1234&stg=13 I get the proper results using the URL In javascript/jscript, I have tried loading the ...
0
votes
2answers
26 views

How to send multipart/form-data to server using Ajax, PHP and jQuery?

I have a form where I need to send name of the user along with his profile image. So I have created the form below using HTML & Bootstrap - <form action="" method="post" id="demoForm" enctype=...
1
vote
1answer
30 views

how to attach ajax to the follow/unfollow links in Rails

I got the following code in my tag.html.erb: The link for unfollow: <a style="margin-top:-8px;" data-method="delete" data-confirm="Are you sure you'd like to unfollow this topic?" rel="tooltip" ...
0
votes
1answer
20 views

assign parseJSON(data) to ajax data variable

i want to assign parseJSON(data) to ajax data variable. data contains: [{ "master_id":"1", "prod":"prod1", "cust":"cust1" }, { "master_id":"4", "prod":"prod4", "cust":"cust4" } ] ...
0
votes
0answers
24 views

PHP AJAX only passes 30 rows of data or less [on hold]

I have this script that works well on one server and has this problem on the other server. Same file. So the new server has this configuration: max_execution_time = 1200 max_input_time = 120 ...
0
votes
2answers
32 views

Count no of rows where two column's value mismatch

I would like to count the number of rows where my two columns does not have equal values. Two column Names are: 1) visitdate 2) revisitdate I have tried this query but no success. $...
0
votes
0answers
14 views

Sending an array of objects from JS to Flask

I am getting an empty [ ] when i hit generate: 127.0.0.1 - - [18/Oct/2019 01:04:37] "POST / HTTP/1.1" 200 - [] Here's the array & JSON in JS: var List = [ { load: "2", location: "3" ...
0
votes
1answer
28 views

Jquery, loop through AJAX JSON response and append to array of element ids

I have found some similar questions but not quite exactly what I need. I am using AJAX to get the real-time status of property availability. I am getting the response to work as needed and can see the ...
1
vote
0answers
41 views

Why AJAX response broken <form> tag

I have 2 simple synchronous AJAX requests: iDialog.LoadContent(url).done( function() { content = iDialog.content; $.ajax({ method: "POST", ...
-1
votes
0answers
14 views

Trouble with Cross Site jQuery AJAX request, my API endpoint is balking at added “callback” parameter

Simple jquery Ajax Call: $.ajax({ url: "https://someurl.com/search?fields=owner", dataType: "jsonp" }).done(function( msg ) { alert( "Data Saved: " + msg ); }); Since it is a cross-site ...
0
votes
1answer
20 views

Can Vue model data property be equal to value that is returned by another Vue data property object?

in my html form I am using flatPickr (calendar picker) component that generates input field on the form. I am trying to figure out how do I change the input field class dynamically if the error class ...
0
votes
0answers
13 views

How to generate dynamic registeration form for different business partners in codeignter [on hold]

I want to create a link when business partner login into his account , he will send a link , if someone opens up a registeration form through that link, this will feed business partner session id into ...
0
votes
0answers
20 views

Hidden column and filter data in datatables

I have a problem with the data table. I will display data from database to table by ajax. I have done a filter that sends data to a php file with ajax. And it works without a problem, but I added the ...
1
vote
0answers
16 views

jquery select2 - Retaining selected value on server validaton failure

I am using jquery select2 (version 4.0) to load data dynamically from an API endpoint in a form. When user submits the form and there are validation errors, the selected value in the select2 ...
0
votes
1answer
14 views

Yii2 renderPartial/renderAjax does not load the js on the view

When I render a view via the renderAjax or the renderPartial methods from the controller the js added to the view don't work. I've got a google places autocomplete and a custom event handler on a form ...
0
votes
0answers
31 views

Create CSV File by php, ajax and mysql

I have the following problem: I'm upgrading a working system, so I have to create code that fits in. I want to create a csv file on a php page and a mysql database. I'm also using Ajax to stay on the ...
0
votes
0answers
18 views

How to implemente ajax Tabs and Google Charts in Yii2

I am trying to implement Google Charts in (ajax) tabs in order to build charts dynamically when the user click on each tab. I'm using Yii2 and (kartik) TabX widget for the tabs ajax functionality. I ...
0
votes
0answers
21 views

Output Control Functions PHP AJAX

I call with Ajax a php file which has a large loop, in each loop cycle I return information from the php file to Ajax, and have done so using ob_flush() and flush(). My problem is in xhr.responseText ...
0
votes
0answers
16 views

have array of Htmlcollection but can't access it [duplicate]

I have many anchor tags with the same class name and need to add event listener click to each one so I called all of them and using ES6 syntax to add the eventlistener like the following but all in ...
1
vote
2answers
57 views

Can't pass a variable to ajax url

I'm trying to pass an id to my controller with ajax. I want to use the id var in the ajax URL but it's not working. where I'm setting the ID <input type="checkbox" class="form-control traite" ...
0
votes
0answers
16 views

Resize Iframe Won't Work On Dynamic Content

My issue is that, I can't seem to make this script work with dynamic content. Whenever, I go on a different page dynamically the script stops working and gives me errors. https://i.imgur.com/k5z1LVa....
0
votes
0answers
22 views

CSRF verification failed on submit after rendering the template via Ajax before

I have a large model formset with initial data, which is injected by ajax through a seperates rendered template. I also pass the csrf token to the template. In the inspector you can also see that the ...
1
vote
1answer
35 views

jQuery Ajax - still reloading the page - Laravel pagination

I have a problem with my Laravel pagination and Ajax. My Ajax still reloading the page, and I don't know why and how to fix it? I want to avoid reloading the page. LATER EDIT : With this Ajax I ...
0
votes
1answer
23 views

leaflet JS Cluster Maker capture ids childrens

I'm using leaflet.js for a marker cluster map, I needed to get the ids of these points that are in the cluster to create an ajax query my code is working correctly but I can't get the ids while ...
0
votes
0answers
10 views

how to Convert mac id to EUI id-64 bit using javascript

I want to generate a random EUI number, after entering my mac_id in the input box, If I change my mac_id the EUI number has to generate automatically without refreshing the page. This is my Html ...
-1
votes
0answers
34 views

Second call to Mathjax typeset function from jQuery not working

I am trying to view the equations typed in HTML textbox (in Tex) as mathematical equations using MathJax. If the equations are not correctly viewed, I need to edit the equations and review it, in ...
0
votes
1answer
26 views

How to put html response received from XMLHttpRequest into an iframe in Angular7?

Does anyone have an idea how to embed this XHR request's html response into an iframe in Angular7? ngAfterViewInit() { var link = document.querySelector('#frame'); this.populateIframe(link,...
0
votes
0answers
19 views

Post permalink within AJAX

I am using Wordpress AJAX load more plugin. I have an issue here with a URL of a post. When I scroll to the next post the URL changes but it does not contain a subcategory within it. But when I view ...
0
votes
0answers
15 views

Django - change datafield on database

i am creating a real estate website in Django. I want users to insert/delete images for their properties. It´s all working as expected, except the delete images. In my views.py i have the code: ...
1
vote
0answers
20 views

Ignored List has “St”, “Li”, “pre” using autocomplete functionality

I should remove the list of words "St", "Pair", "Bri" using automplete functionality. var igonoredWords = [ "st ", "Pair", "Bri", "Elem", "stu" ]; $(".myInput").keyup(function(...
-1
votes
1answer
11 views

How to get id from option of the select tag and send to the cs class in the razor pages

I want to get subcategory from the primary category with ajax Html Code: <select asp-for="secondCategory.CategoryId"> @{ foreach (var item in Model.categories) { <option value="@...
0
votes
1answer
19 views

Return string value from popup form

I want to return a string value from a popup form to be placed in my base form. but I'm not able to get the value in my base form. I call the popup like this. <div class="row"> <div ...
-2
votes
0answers
22 views

Drop down options to be dispalyed on onchange event

I want to get 'choose option' option with no value in drop down menu on onchange of some other event. I have tried to put the choose option in drop down menu but it is affecting the value of other ...
0
votes
0answers
11 views

How to redraw apexcharts if i change value of text?

I have the response data from a url, and I want to enter that data into Apexcharts. so far everything has been going smoothly, then I have a problem where apexcharts must be made / redrawn if a field ...
0
votes
2answers
47 views

Trying to submit a form to MySql with AJAX

I am trying to post from a form to SQL by using Ajax. However, when clicking the button to submit the form, no error is shown in the chrome console and it looks like the PHP is also not being called ...
0
votes
0answers
8 views

Woocommerce Ajax Checkout takes too long to load ?wc-ajax=checkout [on hold]

Our Woocommerce site takes too much time during checkout. When we place an order from the checkout page, domain.com?wc-ajax=checkout request is called and takes too much time (~15s) to process further....
2
votes
0answers
31 views

Clipboard JS not copying button data attribute

I am trying to copy a simple URL which is bound to a button. The console successfully logs the data but it doesn't return the value to be pasted. Please note that the data-clipboard-text changes on an ...