How do I stop executing a function from an iFrame

When on the same server you can run functions inside of the iframe, but to the best of my knowledge you cannot stop existing code from being run.