Questions tagged [jquery-ajax]
58 questions
9
votes
2 answers
XMLHttpRequest cannot load Origin null is not allowed by Access-Control-Allow-Origin
I have a code.html file containing the following code.
$.ajax({
type: "POST",
datatype: "JSONP",
url: "path",
success: function(msg){
var e = document.createElement("div");
e.id = "ads";
document.body.appendChild(e);
…

Thasni anes
- 91
- 1
- 1
- 5
8
votes
1 answer
Struts struts-config.xml action-mapping explained
I am a noob to Struts framework. I am trying to understand how action-mapping works exactly. Suppose I have a JavaScript file that sends an AJAX request:
$("button").click(function(){
$.ajax({url: "myTestUrl.do", success: function(result){
…

Tom O.
- 5,730
- 2
- 21
- 35
5
votes
1 answer
What are the variables [[FunctionLocation]], [[Scopes]]: in the Browser Console
When using jQuery Ajax, in the Browser console I can see the xhr object has two props / fields in some weird notation [double square brackets, don't think it means array in this case];
First, what exactly are they, and second, can I access these…

joedotnot
- 4,810
- 8
- 59
- 91
2
votes
1 answer
Ajax - Filter by price in Shopify / Liquid
I have a collection which I want to be able to filter (not sort) products by price. I do not want to use an app.
I am aware of this question Add price filter in shopify? however this is not what I am looking for; I want to be able to choose any…

DevOverflow
- 37
- 1
- 11
- 32
1
vote
2 answers
Having to refresh a page after form submission using jquery ajax
So I have a page to display courses a student is enrolled in and also in that page is a form in a modal all which is built as a Laravel web project, and the purpose of that form is that a user selects courses(all data is pulled from a database)…

Zion
- 21
- 2
1
vote
1 answer
Why does Switching from JQuery AJAX to Fetch cause a 422 Error?
I'm trying to convert a small FastAPI web app from JQuery AJAX to Fetch API.
The AJAX call sends some JSON to the server which is run through a function on the backend. The original JQuery code looks like this:
static run_task_one(E1, E2, E3,…

Connor
- 867
- 7
- 18
1
vote
2 answers
Prevent node.js from converting a nested object with numeric keys into array
When i have an object with a nested object within, whose keys are numbers and send it to my node.js server, then the nested object is converted to an array. How can i prevent this ?
Client:
$.ajax({
url : `/cctool/report`,
method : "PUT",
…

Tim Graf
- 13
- 3
1
vote
1 answer
Ajax success returns "undefined" in asp.net core
I'm trying to get the json data by ajax and show them in the view. The data is correct in action method but when I want to show the data in table all the s are showed as undefined and so many rows that I know I don't have this much rows .maybe it is…

niki tmb
- 177
- 1
- 14
1
vote
1 answer
JavaScript form (ajax submission) with validation doing something funky
I am trying to do a form validation function with Ajax submission. For some reason the validation doesn't work and when it submits, my server gets the empty fields (when I am testing for the validation) but it shows that it tried to post to the same…
user15254625
1
vote
0 answers
JQuery Sending POST Form Data with ------WebKitFormBoundary instead of serialized variables
I am sending a generated POST request to a Node form processor, and instead of sending form data like this:
url=https%3A%2F%2Fwww.test.com%2F&name=test
It sends this:
------WebKitFormBoundaryqpZZVHfQU2S8f5t0
Content-Disposition: form-data;…

0pt1m1z3
- 841
- 3
- 12
- 23
1
vote
1 answer
Bootstrap | JQuery: How to enable "Required" validation on fields during Form Submit Click?
Following is JS Code:
$('#createCust').on('click', function(e) {
e.preventDefault();
documentCommon.ajax({
dataType : 'text',
url : "/createcustomer",
data : $("body…

fatherazrael
- 5,511
- 16
- 71
- 155
1
vote
4 answers
Jquery Ajax call passed parameter always null in Asp.net MVC Core
I am migrating my MVC application to Asp.Net core (3.1 version) application. I have one layout page which is used for menu navigation. When user click on any menu then i need to pass some value from Layout to the controller for some business…

V.Prasad
- 131
- 4
- 19
1
vote
1 answer
jQuery - How to show elements from GitHub API as desired in an unordered list?
I am trying to get some data from the GitHub API using jQuery(AJAX), and appending it in a static webpage. Below are my HTML and JS snippets.
$(document).ready(function(){
$.ajax({
url:…

PhysicistSouravDas
- 355
- 4
- 17
0
votes
0 answers
Unable to send POST request from browser
We have a Online Admission Counselling process in our Country, but their form to check the ranks is a bit inconvenient, and even more, there is no option to sort by ranks, and it makes it very difficult to find that which institute/course had the…

HarshNJ
- 3
- 3
0
votes
0 answers
400 Bad Request when trying to send data to ASP.NET Core 6 Web API
I am trying to upload some files by sending it to an ASP.NET Core 6 Web API, but when I call the API, it throwing a 400 error. Please help me solve the issue.
File upload model:
public class FileUploadModel
{
public IFormFile[] Files { get; set;…

Sachin M
- 1
- 1