Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > onmouseover and onmouseout does not work

Reply
Thread Tools

onmouseover and onmouseout does not work

 
 
Kurda Yon
Guest
Posts: n/a
 
      02-10-2008
Hi,

I try to create a table of images (images of the same size are put in
a table with fixed number of rows and columns). Moreover, I want image
changes if mouse is no the image. This code works fine:

<table border='0' cellpadding='0' cellspacing='10'><tr>
<td>
<div target="_blank" onmouseover="document.sub_but.src='img_tmp/
706.jpg'" onmouseout="document.sub_but.src='img_tmp/701.jpg'">
<IMG SRC="img_tmp/701.jpg" width="240" height="90" border="0"
NAME="sub_but">
</div>
</td>
<td>
</td>
</tr></table>

However, if I add an image to the second <td></td>-element, the images
(both) does not want to change if the mous is over. So the following
code does not work:

<table border='0' cellpadding='0' cellspacing='10'><tr>
<td>
<div target="_blank" onmouseover="document.sub_but.src='img_tmp/
706.jpg'" onmouseout="document.sub_but.src='img_tmp/701.jpg'">
<IMG SRC="img_tmp/701.jpg" width="240" height="90" border="0"
NAME="sub_but">
</div>
</td>
<td>
<div target="_blank" onmouseover="document.sub_but.src='img_tmp/
706.jpg'" onmouseout="document.sub_but.src='img_tmp/701.jpg'">
<IMG SRC="img_tmp/701.jpg" width="240" height="90" border="0"
NAME="sub_but">
</div>
</td>
</tr></table>

What is the reason of this behavior and how I can reach my goal?

Thank you.
 
Reply With Quote
 
 
 
 
Andy Dingley
Guest
Posts: n/a
 
      02-10-2008
On 10 Feb, 02:00, Kurda Yon <kurda...@yahoo.com> wrote:

> how I can reach my goal?


You start by posting a URL, so that we can see it in action.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(DHTML) using onmouseover and onmouseout to swap images jazzerus@gmail.com Computer Support 1 01-07-2007 09:49 AM
Dynamically adding onmouseover, onmouseout events not working Steve Macleod Javascript 2 05-20-2006 07:01 PM
onMouseOver/onMouseOut not working Epetruk Javascript 12 02-16-2005 12:52 AM
onmouseover / onmouseout not working as expected yawnmoth Javascript 4 12-08-2004 08:13 PM
How to change onmouseover and onmouseout dynamically Tor Inge Rislaa ASP .Net 3 08-06-2003 04:43 PM



Advertisments