# iFrame javascript communication

**URL:** <https://forum.kirupa.com/t/iframe-javascript-communication/238019>\
**Category:** web dev\
**Created:** [September 6, 2007, 11:15am UTC](https://forum.kirupa.com/t/iframe-javascript-communication/238019 "2007-09-06T11:15:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shard](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Shard](https://forum.kirupa.com/u/Shard)\
**Post date:** [September 6, 2007, 11:15am UTC](https://forum.kirupa.com/t/iframe-javascript-communication/238019/1 "2007-09-06T11:15:45Z")

</div>

Hi all, I have an iframe (named ‘base’) that I want to capture the right mouse click event in and have it handled by a function in the containing document (parent) …

frames[‘base’].document.body.onContextMenu=“return parent.navwheel()”;

… but even if i make the function navwheel a simple alert - it never gets called???

Any help or clues greatly appreciated. 🙂
