How to change h:outputText value by JavaScript?
javascript, jsf
Solution
Look in the generated HTML source. Rightclick page in browser and view source. You'll see that the `<h:outputText>` renders a HTML `<span>` element with the value in its body. To alter the body of a `<span>` in JavaScript you need to manipulate the `innerHTML`.
tdt.innerHTML = "new value";
Problem
I already tested with 2 inputText, It runs well for example ``` var tdate = document.getElementById('txtDate'); //h:inputText var tdt = document.getElementById('txtDateTime'); //h:inputText tdate.onchange = function(){ tdt.value = tdate.value; }; ``` How can I change the value of " tdt " - h:outputText? ``` var tdate = document.getElementById('txtDate'); //h:inputText var tdt = document.getElementById('txtDateTime'); //h:outputText ```