String mouseover
hi,
The string should be changed, if the mouse moves over the string. onmouseover must be executed by javascript. But how?
I got error.
<t:outputText onmouseover="this.value='ByeBye';" value="Welcome" />
Manu
hi,
The string should be changed, if the mouse moves over the string. onmouseover must be executed by javascript. But how?
I got error.
<t:outputText onmouseover="this.value='ByeBye';" value="Welcome" />
Manu
That is because JavaScript operates on the client side; the browser never sees your outputText component. It is transformed into HTML markup, probably a span or a div. Neither of these has a value attribute.
In the future please post the error you get as well. Just stating that you received an error is insufficient.
Have you any idea to be changed the text if the mouse is over the element?
ok, in the future will I post error as well.
I solved my problem.
<t:outputText id="test" forceId="true" onmouseover="document.getElementById('test').firstChild.replaceData(0,document.getElementById('test').firstChild.nodeValue.length,'Hallo');" value="Good morning" />
Thanks