View Full Version : Is there any way to find out when the mouse is over right border of the column

Dec 3rd, 2003, 11:11 AM
is there any way to detect when the mouse is over the right border of a table column?

Roy Sinclair
Dec 3rd, 2003, 07:37 PM
Probably, but there's no built-in mechanism for that. You'd have to get a watch going on the mouse move events and compare the mouse position to the position of the border which means you'll need to figure out the size of the cell and of course know the width of the border so you can determine when the position of the mouse would be within the border.

Dec 4th, 2003, 09:09 AM
yeah well i tried to figure out some kind of algorithm but still did not found some thing
that will get the exact col border
some ideas or some help will be great

Dec 4th, 2003, 10:29 AM
If you know:

the position of the column
the width
the border's width

there is a simple substraction to find out the area filled by your border

capture the mose event (position) and compare with the position of that area... should be a quite simple operation, I guess...

Dec 4th, 2003, 12:22 PM
try this trick:

<table border="2" cellpadding="0" cellspacing="0" bordercolor="black">
<td>&nbsp;hover your mouse here --&gt;</td>
<td style="width:1px;border:0px;background-color:black" onmouseover="alert('mouseover')"></td>
<td>&lt;-- hover your mouse here&nbsp;</td></tr>