posted 12 years ago
I am trying to get different information changing every 10 seconds on a line.
The information should be provided by a backing bean, but this is the next step.
Currently I am stuck with the first step, trying to assign text to outputText using javascript.
Following is my approach:
starting with:
<BODY onload="init()"
Having outputText:
><h:form id="Broadcast" >
<h:outputText id="broadcastMessage" value="Text" />
</h:form>
Having some javascript:
var broadcast = document.getElementById('Broadcast:broadcastMessage');
init();
function init() {
broadcast="New";
}
The result when doing this: The value of :outputText is never changing from "Text" to "New" ... am I taking the wrong apporach
To be mentioned:
...using Firefox 5.0
...it does not make much sense just changing from 'Text' to 'New', a will add some functionality where different information is being rotated