Sending an array as a parameter in a URL: A step-by-step guide

xmlHttp.open( "GET", "/mcd/demo.jssp?array="+arr, false ).

How can I retrieve it in jssp? My array is structured as such

arr= [3214,2345,84834,4847,83474,3244,234834,........ over 30,000 values]

Answer №1

The maximum length of a URL is 2000 characters, which means that sending 30,000 array items as a GET request is not feasible.

Instead, consider sending the request using the POST method.

xhttp.open("POST", "/api/data.php", true);
xhttp.send("data="+array);

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I update jQuery CSS method on resize event?

Having trouble vertically centering a div inside the body? I've come up with a jQuery function that calculates the ideal margin-top value for achieving perfect vertical alignment. Here's how it works: Obtain container height, Get child height, ...

Convert the Include/require output to JSON encoding

I have a fully developed PHP application that was not created following the MVC design pattern and lacks a templating system like Twig. The issue I am facing is that instead of receiving a variable that stores the template (HTML output), it directly print ...

What is causing the list to not populate in this code snippet?

How can I populate file paths in a list of strings List<string> img = new List<string>(); when files are posted by the client using dropzone js? The files upload successfully but the list remains empty. Any suggestions on how to resolve this ...

Is there a way to align a threejs object in the middle of a div container

My attempt at centering an object inside a div on my website using JS code has hit a roadblock. Despite trying various posted solutions, I haven't been successful. Any assistance would be greatly appreciated. import * as THREE from 'three'; ...

Neither req.body nor req.file contain any data

Hey everyone, I'm new to coding and currently working on creating a basic markdown blog. However, I'm facing an issue where req.body doesn't contain my markdown field and req.file is undefined when trying to upload an article. I'm unsur ...

Can select2 and a jQuery Virtual Keyboard work together seamlessly?

Is there a method to implement a jQuery virtual keyboard for inputting into a Select2 select box? The issue is that the dropdown in the Select2 component closes automatically when clicked away from, preventing the use of a web-based virtual keyboard. If ...

The form fails to submit even after the validation process is completed

My current dilemma involves the validation of an email and checkbox to ensure they are not empty. Although it initially seemed to work, after filling in the required fields and checking the box, I still receive a warning message (.error) and the form fails ...

Error Message "Alexa.create is not a valid function" encountered while using the Alexa HTML Web API on the Echo Show 10

Here is the HTML code for my custom Alexa Skill. <head> <script src="https://cdn.myalexaskills.com/latest/alexa-html.js"> </script> </head> <body> var alexaClient; Alexa.create({version: '1.0'}) .t ...

Pseudo-element fails to display in React when applied to a paragraph tag, even with display block property set

I am experiencing an issue where the pseudo element ::after is not appearing in my browser. I am currently working with React.js and Material UI's makeStyles. Here is the code snippet causing the problem: modalTitle: { borderBottom: '2px sol ...

Arrange a div close to another div with the help of absolute positioning

My goal is to create a tooltip-like positioning for an element within the same container as another element. When clicked, this particular element will display a div containing a table. You can find the complete code here: http://jsbin.com/xihebol When s ...

Errors in JavaScript are displayed when a React application is built for production

I have developed a client react application using create-react-app. It communicates with a node server that runs an express api. During development, everything was smooth sailing and I was preparing for deployment. After running npm run build, there were ...

Incorporate JavaScript to trigger a click event on a mat-option when the Enter

Situation Within a form field, there is a select dropdown that displays options based on user input in a filter at the top of the list. Desired Outcome The user opens the select dropdown, filters the options by typing, navigates to the desired option us ...

Retrieve an object using a variable

Essentially, my question is how to extract a value from a variable and input it into a sequence. Being Dutch, I struggle to articulate this query correctly. var channelname = msg.channel.name; "description": `${config.ticketlist.channelname.ticketmessage} ...

Tips for adjusting the button icon size based on the size of the page

I need some assistance with resizing an icon in my HTML page that is inside a container with a transparent button. This is how the div is declared in my HTML file: <div class="container button"> <div class="col-xs-10 col-sm-70"> & ...

Should we be concerned about the ethics of running javascript that is fetched through an AJAX request?

Currently, I am working on updating an existing web application that allows for user administration and login capabilities. One of the features involves modifying a user's details through a dialog box, where the updated data is then sent to the server ...

Upon utilizing ComponentDidMount(), a peculiar error surfaced: "Unable to invoke setState."

I encountered the following error: Attempting to call setState (or forceUpdate) on an unmounted component. This is a no-op, but it signals a memory leak in your application. To resolve this issue, cancel all subscriptions and asynchronous tasks in the ...

Is it possible to include a module-level controller within a directive?

I am currently navigating the complexities of controllers, modules, and services in Angular JS. In my attempt to integrate a controller into my directive, I faced an issue. The controller I intend to reference belongs to the same module as the directive, ...

Error encountered in MySQL and NodeJS: Unable to add new query after invoking quit with transactions

While working on implementing MySQL for NodeJS and Restify, I encountered a flawless experience with queries. However, when attempting to utilize data updating functionality through transactions, I faced the error message: Error: Cannot enqueue Query after ...

` Why isn't Glide.js functioning correctly when incorporated into a Bootstrap 4 modal component?`

I'm currently utilizing Glide.js and a Bootstrap 4 modal on our team page to showcase the biography of the selected team member. This functionality is achieved by extracting the attribute of the clicked team member and using it as the startAt: index f ...

Ways to eliminate numerous swipe features in JavaScript on a webpage

Struggling to handle multiple swipers on the page, encountering an issue where the array is always empty in the destroy function for desktop width. The initialization process for mobile devices seems to be working fine. Have tried various methods but end u ...