I have a facebook canvas application that as a top setup bar. I added a like button that opens an IFrame that contains the users who liked the application with an option to like/unlike the application. i added a button to that iframe that's suppose to close that iframe when clicked.
so inside the iframe html i have:
function closeIFrame() {
window.parent.closeLikeIframe();
}
the button that I created execute this function.
inside the parent page I have the following code:
function closeLikeIframe() {
var iframe = document.getElementById('likeIframe');
iframe.style.display = "none";
}
so in Firefox it works great, but it doesn't in other browsers. I can a javascript error
unsafe JavaScript attempt to access frame with URL http://X from frame with URL http://Y. Domains, protocols and ports must match.
user_like.html:15Uncaught TypeError: Property 'closeLikeIframe' of object [object DOMWindow] is not a function
it doesn't find the function closeLikeIframe because the main page sits on facebook while the IFrame itself sits on my servers so i doesn't allow the access.
any ideas on how to properly open and close that IFrame ?
thanks