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?
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<input type="hidden" name="Id" value="83,85,70" />and then you can split it in js and/or server side .formPOST action or usingAJAX?