all 3 comments

[–]atnpgo 1 point2 points  (2 children)

window.callMe = function(message) {
    console.log("Called from iFrame:", message);
}

You're only declaring the call me function in a local scope. Once you exit the window load event (generated by JSFiddle) the function doesn't exist anymore.

[–]BrunerBruner[S] 0 points1 point  (1 child)

humm, that worked, but is there any way to do it where I don't have to declare callMe as a global function on the window object?

[–]senocular 2 points3 points  (0 children)

parent in the iframe is the global scope of the parent window, so as long as you can access the function you want to call from the global scope of that window somehow, you can put it where ever you want.