Dan
18.06.2001, 16:13
Was being a bit lazy so posted my question straight here without searching the web for the answer.
Basically I have a div tag that has a table within it and then a paragraph. I only want to have the div tag as an object and then catch the events onmouseover, out, down etc. without having to add event handlers for the contents of the DIV. e.g:
<pre id=code><font face=courier size=2 id=code><div id="divMenuItem7" class="menuItem" style="top: 197; left: 1; width: 118; height: 23">
<table border="0" width="112" height="23" cellpadding="0" cellspacing="0" align="right">
<tr><td valign="middle"><p class="pMenu"><u>c</u>ontact</p></td></tr>
</table>
</div></font id=code></pre id=code>then in init():<pre id=code><font face=courier size=2 id=code> objMenus[i:k4ihxbx3nw] = new DhtmlObject("divMenuItem" + i, "objMenus[" + i + "]");
objMenus[i:k4ihxbx3nw].obj.onmouseover = menuOver;
objMenus[i:k4ihxbx3nw].obj.onmouseut = menuOut;</font id=code></pre id=code>Now the problem is that the only elements sent to the mouseOver function are the
and the <td>.
I thought about traversing the choldNodes array until I found a div tag with an id but thought there must be an easier way.
<font face='Courier New'><font color=maroon>»» Dan (dan@pupius.net)
»» www.pupius.net || www.endoflow.com</font id=maroon></font id='Courier New'>
Basically I have a div tag that has a table within it and then a paragraph. I only want to have the div tag as an object and then catch the events onmouseover, out, down etc. without having to add event handlers for the contents of the DIV. e.g:
<pre id=code><font face=courier size=2 id=code><div id="divMenuItem7" class="menuItem" style="top: 197; left: 1; width: 118; height: 23">
<table border="0" width="112" height="23" cellpadding="0" cellspacing="0" align="right">
<tr><td valign="middle"><p class="pMenu"><u>c</u>ontact</p></td></tr>
</table>
</div></font id=code></pre id=code>then in init():<pre id=code><font face=courier size=2 id=code> objMenus[i:k4ihxbx3nw] = new DhtmlObject("divMenuItem" + i, "objMenus[" + i + "]");
objMenus[i:k4ihxbx3nw].obj.onmouseover = menuOver;
objMenus[i:k4ihxbx3nw].obj.onmouseut = menuOut;</font id=code></pre id=code>Now the problem is that the only elements sent to the mouseOver function are the
and the <td>.
I thought about traversing the choldNodes array until I found a div tag with an id but thought there must be an easier way.
<font face='Courier New'><font color=maroon>»» Dan (dan@pupius.net)
»» www.pupius.net || www.endoflow.com</font id=maroon></font id='Courier New'>