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

capture mousedown inside Iframe

P: 9
Here is my code:::

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

what is wrong why cant i get mousedown function inside Iframe

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

Thanks
Feb 23 '08 #1
Share this Question
Share on Google+
1 Reply


100+
P: 428
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.
Feb 23 '08 #2

Post your reply

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