How can you load text when you mouseover a word

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Wanting to know if and how you can make text appear in one cell when you move
the mouse over a word in another cell. want to do this so that i can make
information about that name come up if you scroll over the name.
Cheers
 
Luke said:
Wanting to know if and how you can make text appear in one cell when
you move the mouse over a word in another cell. want to do this so
that i can make information about that name come up if you scroll
over the name.
Cheers

Try the code below.

The first <div> has a cell, which when moused over makes the text appear in the cell in the second <div>.

This may not quite be what you want since you may want the second table to be always visible but different things to appear when
different cells in the first table are moused over. If you do want this, please post back as this can also be done.

<html>
<head>
<script type="text/javascript">
function hideit(elid,hide) {
if (hide != "show") document.getElementById(elid).style.display="none"
else document.getElementById(elid).style.display="block"
}
</script>
</head>
<body>

<div style="float:left">
<table>
<tr>
<td valign="top" onmouseover="hideit('row1','show')" onmouseout="hideit('row1','hide')">
Item 1
</td>
</tr>
</table>
</div>

<div>
<table border="1">
<tr>
<td id="row1" style="display:none">
Item 1 Full description<br>
Blah blah blah <br>
Blah blah blah <br>
Blah blah blah <br>
</td>
</tr>
</table>
</div>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top