Click to move DHTML Item

[Total: 0    Average: 0/5]

This example will move the form (IE only) to the Y coord. that was clicked.

Head Code:


Body Code:

function mouseMoved() 
var eobj,thex,they 
eobj = window.event 
thex = eobj.clientX; 
they = eobj.clientY;;  // moves the top to where the cursor is clicked.

// this updates the next clicks


<form style="position:absolute;" name="formname1" ACTION ="previewXYpage.cfm" METHOD="Post" > 
<table bgcolor="#COCOCO" cellspacing="1" cellpadding="1" border="2"> 
    <td WIDTH=1%><class="clickablearea">This a clickable row</td> 

The X Co-Ordinate is <input type="text" width=50 name=x1 value=""><BR> 
The Y Co-Ordinate is <input type="text" width=50 name=y1 value=""> 

<INPUT class="clickablearea" TYPE = "Submit" VALUE ="Enter"> 
<INPUT class="clickablearea" TYPE = "Reset" VALUE ="Clear"> 


Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *