tsuyoshi
asked on
Change text with onmouseover/onmouseout
We can change images with onmouse.... events. But I'd like to change text with this events. Can I do it?
Thanks.
Thanks.
something more Cross Brosers would be :
<SCRIPT LANGUAGE="JavaScript">
<!--
sON="<font color='#FF3366'>test</font >"
sOUT="<font color='#663399'>test</font >"
function ch(that){
if (document.all) {
if (that==1) moshe.style.color="#FF3366 ";
else
moshe.style.color="#663399 ";
}
else {
ref=document.layers.w.laye rs.moshe.d ocument
if (that==1) {ref.write(sON);ref.close( );}
else
{ref.write(sOUT);ref.close ();}
}
}
//-->
</SCRIPT>
<layer id="w" name="w" onMouseOver="ch('1')" onMouseOut="ch('2')">
<div id=moshe name=moshe style="position:absolute" onMouseOver="ch('1')" onMouseOut="ch('2')">
test
</div>
<layer>
<SCRIPT LANGUAGE="JavaScript">
<!--
sON="<font color='#FF3366'>test</font
sOUT="<font color='#663399'>test</font
function ch(that){
if (document.all) {
if (that==1) moshe.style.color="#FF3366
else
moshe.style.color="#663399
}
else {
ref=document.layers.w.laye
if (that==1) {ref.write(sON);ref.close(
else
{ref.write(sOUT);ref.close
}
}
//-->
</SCRIPT>
<layer id="w" name="w" onMouseOver="ch('1')" onMouseOut="ch('2')">
<div id=moshe name=moshe style="position:absolute" onMouseOver="ch('1')" onMouseOut="ch('2')">
test
</div>
<layer>
ASKER
Ok thank you. But I think that it isn't what I really need.
I'd like to pass the mouse over the picture, and change a text in another place, like a status panel.
PS:Sorry if my English is wrong.
I'd like to pass the mouse over the picture, and change a text in another place, like a status panel.
PS:Sorry if my English is wrong.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
YES! Thank you very much!
PS: You're very fast to answer!
PS: You're very fast to answer!
You are more then welcome.
That works only on IE.
<SPAN onmouseover="this.innerTex