How to call parent window function in chrome browser?
Posted
by Pier Luigi
on Stack Overflow
See other posts from Stack Overflow
or by Pier Luigi
Published on 2010-03-31T06:14:21Z
Indexed on
2010/03/31
7:23 UTC
Read the original article
Hit count: 1282
HI, I've surprisingly found problems, in Chrome browser, in calling window parent javascript functions. If I have a window with a javascript function defined in it
<script type="text/javascript">
function dolink() {
. . .
}
</script>
and I have an iframe inside that window that makes this call using jquery
<script type="text/javascript">
$(function() {
$('a.arglink').click(function() {
window.parent.dolink($(this).attr('href'));
return false;
});
});
</script>
the call to dolink function doesn't work. Stepping with chrome javascript debugger, it appears that window.parent.dolink is undefined. It's by design or a mistake that I made? In Firefox and IE it works fine.
© Stack Overflow or respective owner