I have an iframe and inside that iframe a javascript function. I would like to be able to call that function from iframe's parent because I need to set some values inside the iframe when it opens. So far I tried:
ClientScript.RegisterClientScriptBlock(this.GetType(), "saveTasks", "<script type='text/javascript'> function SaveTasks() { frames['myIframe'].location.href = 'myURL'; frames['myIframe'].test(); } </script>");
However, I am not able to call the test() function found in myURL file.
What is the specific syntax to do this, to call a javascript function inside child from its parent? Thank you
iframe's URL in the same domain as your parent website?