Changing text when hover on an image - not in an input field

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Changing text when hover on an image - not in an input field

Post by pilau »

Yo.

My new website need a side menu that will have a few medium-sized buttons on it, and when the mouse hovers on one button, a different text should be presented on the right.
How should that be done? I am not using input fields, So I couldn't just value = "text" it.

The text presented would probably (or maybe - trivialy) be inside a span or a TD.

Example of the page layout:

Code: Select all

-----------------------------------------
                   |
BIG BUTTON1        |
                   |    //Text will be
-------------------|    //loaded here.
                   |
BIG BUTTON2        |
                   |
-------------------|
                   |
BIG BUTTON3        |
                   |
-------------------|
                   |
BIG BUTTON4        |
                   |
-----------------------------------------
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

something to help

Code: Select all

<span id="content">
</span>
<img onmouseover="document.getElementById('content').innerHTML='Hoorah!'">
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

F*** Saibot you're a magnificent geinous my man!
Post Reply