I came across this problem a week ago when I tried to develop an interface between an Iframe, or in Detail it’s content, and the iframes parent page. Turns out that the following code wouldn´t work in FireFox although all other browsers, yes even our friend the Internet Explorer, would behave as expected.
function accessIframeJS(IframeName, methodName, methodParams)
{
var IFrameObj = window.frames[IframeName];
var methodCall = "IFrameObj."+methodName+"("+ methodParams +")";
try{
eval(methodCall);
}catch(error){
// some code here for error handling
}
}
Traced on Firebug it turns out that FireFox loses the IFrameObj on Drag & Drop while rewriting the DOM. Took me quite a while, and a long talk with uncle google until I took a look at bugzilla of mozzilla and the huge amount of iframe Bugs mentioned there. But I found the solution after reading alot of those posts,.. and yes as all ways it is an easy one, if you knew the solution.
function accessIframeJS(iframeId, methodName, methodParams)
{
var IFrameObj = document.getElementById(iframeId).contentWindow;
var methodCall = "IFrameObj."+methodName+"("+ methodParams +")";
try{
eval(methodCall);
}catch(error){
// some code here for error handling
}
}
Ta ta,… this works everywhere,… but it took me a long search, until I found the post in Bugzilla.


Ha, I’m glad you found the solution. Sorry I wasn’t much help