So, I am trying to to fill an html tag with a variable from javascript. The code that I am doing seems to be partially working but not fully as it is not showing what I am trying to show
The problem is that when I alert the variable from javascript, the value is displayed in the alert, but when calling it from different parts, nothing happens.
var client_code = "SOMETHING";
client_code = String(client_code);
document.getElementById('titleClientCode').value = client_code;
//javasctipt where it is not showing
document.getElementById("titleClientCode").hidden = false;
<h4 class="modal-title" style="display:inline" type="hidden" id="titleClientCode" name="titleClientCode"></h4>