kingsfan76
asked on
capture mouse coordinate to reposition a <div>
I want to be able to reposition a <div> based on the mouse coordinate when it's clicked:
-------------------------- ----------
function repositionDiv()
{
//???????????
}
<table>
<tr onClick="repostionDiv()">
<td>Row 1</td>
</tr>
<tr onClick="repostionDiv()">
<td>Row 2</td>
</tr>
</table>
<div id=myDiv style="width:300;height:10 0" style="display:none">
<table bgColor=white width=280>
<tr>
<td>This is the div i want to display when Row 1 or Row 2 is clicked</td>
</tr>
</table>
</div>
--------------------
Thanks in advance
--------------------------
function repositionDiv()
{
//???????????
}
<table>
<tr onClick="repostionDiv()">
<td>Row 1</td>
</tr>
<tr onClick="repostionDiv()">
<td>Row 2</td>
</tr>
</table>
<div id=myDiv style="width:300;height:10
<table bgColor=white width=280>
<tr>
<td>This is the div i want to display when Row 1 or Row 2 is clicked</td>
</tr>
</table>
</div>
--------------------
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.