Need Urgent help in IFrames
I am working in IE and FireFox compatibility. In my application we are creating dynamic iframes inside another iframe. I have to access a div inside the iframe. In IE everything is working fine. But in Firefox, I am not able to access the div. Can somebody help me out on this.
I have tried using
iframename.getElementByTagName("divname") --> This was not throwing any error but the element length was 0.
I have created the iframe using the method
var iframe = document.getElementById(name)
ifDoc = iframe.contentDocument
ifDoc = iframe.contentWindow.document
ifDoc = iframe.document
alert ("value for getIframe is "+ifDoc);
Give the iframe a name
<iframe src="index.htm" name="foo"></iframe>
I have already created the frame and named it.
But I am creating sub frames within the same frame and then I am trying to access the divname which is not working.
Are you certain that the new iframe's document has loaded at the point that you're trying to access it?
yes. I am checking that before accessing the divname.
Originally Posted by Sterling Isfine
"location" is a keyword, try with a different name.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread