change value of input hidden with the value from another div javascript code example
Example: javascript change hidden input value
document.getElementById("myHiddenInputID").value = "MyNewValue";
document.getElementById("myHiddenInputID").value = "MyNewValue";