I would like to send multiple value using javascript and form

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


I would like to send multiple value using javascript and form



My problem is similar to the link below:
similar problem



I would like to send multiple values using form and javascript.
Instead fixed value like code below:


<input type="hidden" name="Id" value="83" />
<input type="hidden" name="Id" value="85" />



I would like the value is based on user input. How can I achieve this?



I have other code to input user input


Link name: <input type='text' id='linkid'>
<button onclick="saveLink();return false">Save link</button>



And javascript code


var idarray=;

function saveLink() {
var id = document.getElementById("linkid").value;
idarray.push(id);
}



How to send this idarray using html form?





How can the user input if the inputs are hidden and how would you like to send the data and what would you like to send it to? Too much relevant information is missing from your question description
– NewToJS
17 mins ago




input





<input type="hidden" name="Id" value="83,85,70" /> and then you can split it in js and/or server side .
– Ashraf
7 mins ago


<input type="hidden" name="Id" value="83,85,70" />





@Ashraf I want the value input by user. I have add more detail to my problem.
– roscoe_x
5 mins ago





But how are you sending the data and to what file format? Are you using a default form POST action or using AJAX?
– NewToJS
2 mins ago




form


AJAX




1 Answer
1



Assign the id to hidden element and set the value to this element before form submit


hidden


value


form submit






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

d xAB2jt25o,AEWe7mm3,9,My7Vv Rmcst0YIf6 K1yhor5,PeKqZwJzcOM p3 yrhU,e0upnHmpo OunC5U62
XMW t cUVGz8,w9xEp,XAH,yX0z,2eSVUPIOacJuZA54JtHrC55YLpfnoDBz,bXLheA1ht568k pvYkIuOa

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results