tags:

views:

241

answers:

2

hi,

i want to call the functions movein(this) & moveout(this) directly with out using onmouseover or onmouseout by the way (this) is [object htmlDivElement]

  var tb = '<div id="' + o.id + '" onmouseover="movein(this);" onmouseout="moveout(this);"><div><table>\n';
+2  A: 

Tried movein(document.getElementById(o.id)) & moveout(document.getElementById(o.id)) ?

K Prime
but there is a table ... can you rewrite the hole code? thanks
jjj
didn't work..!i need to put the functions out propably..?
jjj
it works but in deferent place in code
jjj
All you really need to take care of is passing the right id (of the element you want) to _document.getElementById_. Whether it's a DIV or TABLE doesn't really matter, unless _movein_ / _moveout_ expects a certain kind
K Prime
+1  A: 

Using event delegation may be an option for you, see my answer to this question. Using event delegation, you define a mouseover/-out handler on the table and let the handler decide if and what action has to be taken.

KooiInc
no ... it is deferent ..thanks any way
jjj