How do I use asp.net (vb coding) to write the X Y mouse position coordinates to a server-side textfile?

I want to write the mouse position coordinates to a text file on the server as users move the cursor around. I would like to do this about 5-10 times per second via some type of appending-a-textfile method or perhaps store them in a hidden field (e.g. a hidden listbox etc) and then write them all at once to the server-side file. Anyone know how I can accomplish this? Many thanks.....

LVL 4
jazjefAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CoyotesITCommented:
This will capture the xy of the mouse onmove and will put the values in a textarea
<html>
 
<head>
 
<script language="javascript">
	function getXY()
	{
		var t = document.getElementById("mousexy");
		
		var x = window.event.clientX;
		var y = window.event.clientY;
		var xy = "X: " + x + ", Y: " + y + "\n";
		
		t.value = t.value + xy;
	}
</script>
 
</head>
 
<body onmousemove="getXY()">
 
<textarea id="mousexy" type="text" style="height:300px; width:400px;"></textarea>
 
</body>
 
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jazjefAuthor Commented:
Brilliant.
0
CoyotesITCommented:
One note, use

pageX, pageY for Firefox.

if that is a concern.




0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.