I am trying to access the the text field with the id="first" so that i can potentially read what ever information is in it or even write information to it through java script.
This is the last method that i tried, i know that would not have worked but my brain is tired, I've been at this for days. I'm new to java script, and i'm just toying around with this as an experiment but now its driving me crazy.
<script>
{ var targetDiv = document.getElementById("popover-content-
right").getElementsByClassName("well popover-
right").getElementById("edit-
user").getElementById("first")[0];
targetDiv.textContent = "Hello world!";
}
</script>
I've tried several other methods but non have worked.
<div id="popover-content-right" class="well popover-right" data-
dicomgrid-active-popover="create" style="top: 133px; width: 480px;
display:
block;">
<form id="edit-user" onsubmit="return saveForm(this)">
<div class="form-inline">
<div class="form-group">
<label data-i18n-token="global:first-name">First name</label><br>
<input id="first" data-validate="required" class="form-control">
<span class="help-inline small"></span>
</div>
</div>
</form>
</div>
I'm wanting that when i write something to the text field that it shows up there e.g "Hello world", but right now i get nothing, it just stays blank.
Any help is greatly appreciated. Thanks