get data from iframe to parent javascript code example
Example 1: how to access parent function from iframe
document.getElementById('targetFrame').contentWindow.targetFunction();
Example 2: js pass variable from iframe to parent window
function zipPhoneCallback(zipphone) {
((console&&console.log)||alert)("zipphone = " + zipphone);
}