This page has moved. You will be automatically redirected to its new location in 10 seconds. If you aren't forwarded to the new page, click here.

Search This Blog

Wednesday, July 15, 2009

Access function defined in parent from inside an Iframe

this is the function defined in a.aspx
this page has an iframe which will call this method

<script type="text/javascript">
var myIframeUrl;
function modifyVar(val) {
myIframeUrl = val;
}
</script>
-----------
in the iframe use this statement:
<script type='text/javascript'>parent.modifyVar('" + requestURL + "');</script>"

No comments:

Post a Comment