PDA

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



frontline
12-03-2003, 10:11 AM
Hello
is there any way to detect when the mouse is over the right border of a table column?
thanks

Roy Sinclair
12-03-2003, 06: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.

frontline
12-04-2003, 08: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
thanks

Kor
12-04-2003, 09: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...

glenngv
12-04-2003, 11:22 AM
try this trick:



<table border="2" cellpadding="0" cellspacing="0" bordercolor="black">
<tr>
<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>
</table>


:cool: