mouseover - how to...

B

Bad_Kid

I have text (in table cell) and 1 picture (in other table cell)
is there a javascript that does this: when i move mouse over that cell with
text -> picture get border (or some other effect, picture resizes, ...)??
thnx!
 
I

Ivo

Bad_Kid said:
I have text (in table cell) and 1 picture (in other table cell)
is there a javascript that does this: when i move mouse over that cell with
text -> picture get border (or some other effect, picture resizes, ...)??
thnx!

For example:
<table><tr>
<td><a href=""
onmouseover="document.images.pic.border=1"
onmouseout="document.images.pic.border=0"
text</a></td>
<td><img id="pic" src="yourpic.gif"></td>
</tr></table>

Modern browsers allow onmouseover and onmouseout to be set directly in the
<td> opening tag, for older browsers you need to wrap the text in an <a> tag
(which can be made to look like ordinary text) as shown above.
HTH
Ivo
 
G

Grant Wagner

Bad_Kid said:
I have text (in table cell) and 1 picture (in other table cell)
is there a javascript that does this: when i move mouse over that cell with
text -> picture get border (or some other effect, picture resizes, ...)??
thnx!

Yes, there is Javascript that will do that.

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.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

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top