PDA

View Full Version : is it possible to change the text displayed using the onmouse over event


vicki_b
07-21-2003, 04:57 AM
I have a joke on my home page and I want to be able to hide the answer until the user puts their mouse over the question. My question is firstly is this possible and secondly if it is possible how do I go about doing it???

Thanks

Vicki:confused:

oracleguy
07-21-2003, 07:02 AM
You mean like have a tooltip contain the answer?

If so, you should be able to do that with the title attribute.

e.g.<p>blah blah <span title="answer">question</span></p>

vicki_b
07-21-2003, 07:40 AM
Thanks but I was thinking more along the lines of a mouse over that simply either replaces the question with the answer or displays the answer on the next line. Is this possible???

Vicki

Mhtml
07-21-2003, 08:08 AM
<div onmouseover="this.innerText='your punch line'" onmouseout="this.innerText='your funny joke here'">Your funny joke here</div>


Something like that?

vicki_b
07-21-2003, 08:14 AM
You are a living legend!!! That is exactly what I wanted thanks a bunch....you are my life savor!!!

Thanks again to all those who attempted to help...your help and persistance in places like these is what makes the site....

Thanks

Vicki b

Mhtml
07-21-2003, 08:48 AM
No problem. :)