I need to capture right mouse click event inside a iframe in asp.net using any javascript or jquery codes.
below is the code i have tried so far.
Hey: this might help:
How Enable Right Click in IFRAME with JavaScript
or
http://forums.asp.net/p/1818670/5042726.aspx/1?Capture+mouse+right+click+event+inside+a+iframe+using+jquery+
This is not possible I'm afraid. When you're inside the iframe, you're in a second tag... Unless you own what's inside the iframe and are able to put your Javascript on the page within then it's impossble. iframes are very limited for many many security reasons.
Please let me know if anyone thinks otherwise, happy to take this post off.
Although Try this hack mentioned here: http://www.codingforums.com/archive/index.php/t-8824.html
or here http://forums.mozillazine.org/viewtopic.php?f=19&t=371334
cheers,
It is possible if the page inside an iframe
is on the same domain.
IFrame page at same domain: http://fiddle.jshell.net/rathoreahsan/MNtw8/8/show/
See Demo: http://jsfiddle.net/rathoreahsan/gJtkW/
While if you access the page of an other domain inside an iframe
like you are doing then it is not recommended.
Edited: See some references given below, hope it will be helpful.
the-iframe-cross-domain-policy-problem
cross-domain-iframe-resizing