Connecting Tech Pros Worldwide Forums | Help | Site Map

How to set the Mouse position in javascript?

Member
 
Join Date: May 2008
Posts: 118
#1: Oct 23 '09
Hi,


I am using one button at the bottom of the page. When i click on that button the page refreshes and goes to the top of the page.But i want when i click on that button the page refreshes and mouse pointer goes to the bottom of the page where the button consists. i have found that it is possible in javascript through set the coordinates for mouse pointer.

Anybody could you please tell the solution how can i resolve my problem.

Thanks in Advance



Thanks
Swetha

gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,136
#2: Oct 24 '09

re: How to set the Mouse position in javascript?


I'm not aware of any method to set the mouse position through javascript ... imagine that a webpage would do that ... it could get control over your inputdevice and you wouldn't be able to do anything ... but you might retrieve the mouse's position. however you might use a scrolllTo() and/or the focus() method to scroll to a position and/or focus a node in the page.

kind regards
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,670
#3: Oct 24 '09

re: How to set the Mouse position in javascript?


you could add an anchor to the URL to get down again.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,589
#4: Oct 26 '09

re: How to set the Mouse position in javascript?


...or use scrollIntoView().
Reply