J
Jeremy
If we have an iframe loaded from the same domain as the parent document,
how can we (is it possible) to execute a function on the parent
document's page?
e.g.
1) On parent page:
------------------
<script type="text/javascript">
<!-- Hide from w3c validator
function tester()
{
alert('tester');
}
//-->
</script>
2) Then we embed an iframe thus:
--------------------------------
<iframe id="locframe" src="iframepage.html" scrolling="no"
marginwidth="0" marginheight="0" frameborder="0"></iframe>
3) Then within the iframepage.html we have a button:
----------------------------------------------------
<input type="button" value="Execute parent.tester"
onclick="parent.document.tester();" />
Should we be able to execute that function and if so how should it be
referenced?
how can we (is it possible) to execute a function on the parent
document's page?
e.g.
1) On parent page:
------------------
<script type="text/javascript">
<!-- Hide from w3c validator
function tester()
{
alert('tester');
}
//-->
</script>
2) Then we embed an iframe thus:
--------------------------------
<iframe id="locframe" src="iframepage.html" scrolling="no"
marginwidth="0" marginheight="0" frameborder="0"></iframe>
3) Then within the iframepage.html we have a button:
----------------------------------------------------
<input type="button" value="Execute parent.tester"
onclick="parent.document.tester();" />
Should we be able to execute that function and if so how should it be
referenced?