Troubles with objects heritage.

V

Vincent M.

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.
 
M

Michael Winter

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
 

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,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top