Troubles with objects heritage.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vincent M.

    #1

    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:


    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.getEle mentById('deep_ 0').innerHTML =
    document.getEle mentById('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.getEle mentById('td_' + up + '_' +
    id_on).style.ba ckgroundImage=' 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="th is.backgroundIm age=...">

    Thank you,
    Vincent.

  • Michael Winter

    #2
    Re: Troubles with objects heritage.

    On Tue, 27 Apr 2004 01:14:33 +0200, Vincent M. <cult@free.fr > wrote:
    [color=blue]
    > 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[/color]

    [snip]

    Take a look at an example I wrote:

    <URL:http://www.mlwinter.pw p.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.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

    Comment

    Working...