470,591 Members | 1,557 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

Troubles with objects heritage.

Hello,

I am trying to a onMouseover to the change the background of <td>s when
the mouse is on, the problem is that does not work when we put the
content of these <td>s inside another table thanks to innerHtml.

I simplified as possible the source and you can check this here:
http://cult.free.fr/test_menu/test_menus.html

So,
When the mouse is on the vertical level of "Categories" we put the
content of right table inside the down table:

function dis_firstmenu() {
document.getElementById('deep_0').innerHTML =
document.getElementById('menui_' + -1).innerHTML ;
}

Next, when the mouse go through the cells ( Vacances, Bricolage,
Toulouse, Soirees ) this change the <td> background of the right table
instead of changing the background of the down table cells.:
document.getElementById('td_' + up + '_' +
id_on).style.backgroundImage='url(menu_on.png)' ;

Does anyone know how to manage to make backgrounds change in the down
table knowing that I must use the function bgmenu_on(up, id_on) {...}
and cannot use any <td onMouseover="this.backgroundImage=...">

Thank you,
Vincent.

Jul 23 '05 #1
1 1076
On Tue, 27 Apr 2004 01:14:33 +0200, Vincent M. <cu**@free.fr> wrote:
I am trying to a onMouseover to the change the background of <td>s when
the mouse is on, the problem is that does not work when we put the
content of these <td>s inside another table thanks to innerHtml.

I simplified as possible the source and you can check this here:
http://cult.free.fr/test_menu/test_menus.html


[snip]

Take a look at an example I wrote:

<URL:http://www.mlwinter.pwp.blueyonder.co.uk/clj/vincent/menu.html>

I don't know how much use this will be to you, but if it looks promising
and you have trouble adapting it, post a full version of the page you want
this to work with.

As the background images you use don't seem to be necessary, the example
uses a background colour. However, the code that would use the images is
included in the page, it's just commented out. Don't forget that you can
change the URLs to make them relative rather than absolute.

Good luck,
Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Eddie Fisher | last post: by
15 posts views Thread by Improving | last post: by
reply views Thread by stephane parenton | last post: by
reply views Thread by stephane parenton | last post: by
2 posts views Thread by Sebastian Davancens | last post: by
18 posts views Thread by Istvan Albert | last post: by
5 posts views Thread by Alexandre Badez | last post: by
6 posts views Thread by Ruben | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.