How to change h:outputText value by JavaScript?

Posted by Peter on Stack Overflow See other posts from Stack Overflow or by Peter
Published on 2012-06-01T04:18:38Z Indexed on 2012/06/01 4:41 UTC
Read the original article Hit count: 145

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jsf