0

I have one html openning inside an iframe.One javaScript function is defined there say getSomething().Now in the parent page I have one external javaScript file.Is it possible for me to access getSomething() from the external javaScript file ?

1

1 Answer 1

1

As long as both URLs are from the same domain, you can do it. Try calling something similar to the following from the external script file:

document.getElementByID("ReferringiFrame").getSomething();
Sign up to request clarification or add additional context in comments.

1 Comment

I saw Andy E's comment on your question. Seems like it might be a duplicate question. Please check the suggested answers there first...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.