capture mousedown inside Iframe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hpandya
    New Member
    • Jan 2008
    • 9

    capture mousedown inside Iframe

    Here is my code:::

    <iframe id="test" name="test" width="840" height="880"
    frameborder="no " scrolling="no" onmousedown=ale rt("wow")></iframe>

    what is wrong why cant i get mousedown function inside Iframe

    How to fix it - please send me code...

    Thanks
  • mrhoo
    Contributor
    • Jun 2006
    • 428

    #2
    Your iframe is in the current window, but any events come from the window contained by the iframe. If the document in the iframe has the same origin as the containing page you can access those events, but you have to go through the contained window and its own document tree.

    Comment

    Working...