Move the cursor position in iframe via javascript


i want some code to move the cursor position in an IFrame via Javascript or jquery. Really it will help me a lot.

Not possible. To answer why that's impossible, imagine:

  1. I include an iframe to some very important business (let's suppose for a moment this business does not have frame-busting code)
  2. When the user reaches my page, it begins manually controlling the cursor's position to highlight the "Delete Account" button, and simulates a click.
  3. User's account is deleted on a completely different site, through none of their input.

Javascript allows you many UI-coding capabilities, but ultimately the user is in control. Even events like the "onpageunload" are very much restricted in what they can do, and browsers will often include 'escape' options even there. Furthermore, even in the instance that you CAN find a way around these chains, it will frustrate and quite possibly even panic many of your users. I try to warn people that any instance in which you're "re-coding the browser" may lead to all sorts of unpredictable issues, and may even prevent handicapped accessibility to your site.

It might help us to know if there's some specific reason you'd like to do this - possibly the solution is not what you think it is. For instance, if you are trying to make an FPS using WebGL, I seem to remember Chrome including some function to allow for mouse control inside of a window (possibly taking a browser confirmation dialog)