Hello,
I know it's LONG, but please read, it's an interesting problem, but I'm sure I'm issing something
I was working on a drag-drop script. I was able to pick up an object, and move the object setting position: absolute, and
myobject.left = event.pageX;
myobject.top = event.pageY;
The idea is to drop my object on one of the rows of a table. The way I had it originally: when dropped, onmouseup I move my absolutely positioned element back where it started from, and then I had each row have onmouseover="mouseOverRow(this)". So when I drop it, the thing I dragged goes out of the way, and the onmouseover attribute picks up where my pointer is (where I dropped it) and gives me the specific row back.
NOW, This worked perfectly with Firefox, but did not work with internet explorer!!
With IE, the onmouseup fires, but onmouseover attribute of the row does not fire until I move my mouse one pixel.
I don't know how to solve this problem, maybe there is a way to force fire to recheck the onmouseover? Do you guys have any ideas? or how else I can which relative/static element i dropped it on.
Thanks in advance, I would REALLY appreciate it if you guys can give me some insight.
I tried using event.target to see if mouse is over the element, but IE sets target only if I clicked.
PS: Since my table is statically placed with non-fixed width, I can't simply check if my cursor position is inside the table width by comparing it with the coordinates of 4 sides of the box.
I know it's LONG, but please read, it's an interesting problem, but I'm sure I'm issing something
I was working on a drag-drop script. I was able to pick up an object, and move the object setting position: absolute, and
myobject.left = event.pageX;
myobject.top = event.pageY;
The idea is to drop my object on one of the rows of a table. The way I had it originally: when dropped, onmouseup I move my absolutely positioned element back where it started from, and then I had each row have onmouseover="mouseOverRow(this)". So when I drop it, the thing I dragged goes out of the way, and the onmouseover attribute picks up where my pointer is (where I dropped it) and gives me the specific row back.
NOW, This worked perfectly with Firefox, but did not work with internet explorer!!
With IE, the onmouseup fires, but onmouseover attribute of the row does not fire until I move my mouse one pixel.
I don't know how to solve this problem, maybe there is a way to force fire to recheck the onmouseover? Do you guys have any ideas? or how else I can which relative/static element i dropped it on.
Thanks in advance, I would REALLY appreciate it if you guys can give me some insight.
I tried using event.target to see if mouse is over the element, but IE sets target only if I clicked.
PS: Since my table is statically placed with non-fixed width, I can't simply check if my cursor position is inside the table width by comparing it with the coordinates of 4 sides of the box.