[RESOLVED]Parent Obj from iframe?

$(document).ready(function () {
    getOrgAndLangData();
});

function getOrgAndLangData() {
    $.getJSON("api/Organization",
        function (data) {
            var orgAndLangObj = $.parseJSON(data);
        }
    );
}

I have an iframe called main. How do I access orgAndLangObj from the iframe? The above code is in the parent page.

Thanks.

Could you try window.parent or window.top ?

window.parent worked. Thanks.

You’re welcome, have a nice day!

Leave a Reply