By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,657 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

How to set the Mouse position in javascript?

100+
P: 118
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
Oct 23 '09 #1
Share this Question
Share on Google+
3 Replies


gits
Expert Mod 5K+
P: 5,390
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
Oct 24 '09 #2

Dormilich
Expert Mod 5K+
P: 8,639
you could add an anchor to the URL to get down again.
Oct 24 '09 #3

acoder
Expert Mod 15k+
P: 16,027
...or use scrollIntoView().
Oct 26 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.