Hi to all I'm trying to get an iframe and call a function that is define inside the iframe, every thing is working OK in IE and Safari, when I try to do the same in Firefox is not working.
The followoing is the code I'm using, any ideas, how to get the iframe window, I try also getElementByID but also is not working

// IE
//var iframe= window.[<iframe Name>];
iframe.MyMethod();
var iframe= window.myIframe;	
// safari and FF
//var iframe = window.frames["[<iframe NAme>]"];
var iframe = window.frames["myIframe"];
iframe.MyMethod();
<iframe id="myframe" src="...">

var frame = document.getElementById("myframe");
frame.contentWindow.MyMethod();

//MyMethod needs to be defined as a function on the page listed in src="..."
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.