0
<iframe name="aa">
  <iframe name="bb">
  </iframe> 
  <iframe name="cc">
  </iframe> 
</iframe>

(assume that iframes shown above have all the required attributes.)

Can I get subframes of frame with name="aa" in native javascript?
Browser renders them all, no problem.
I was trying frame.frames to get the array of inner frames, where frame is frame object for outer frame i.e, "aa". But it is not working.
Is it even possible ?
Any help ???



Many thanks.

3
  • 2
    i tried your tags found in FF iframe aa amd cc is rendered separately and in IE the 3 iframes rendered separately. give me some use of your idea ? Commented Sep 5, 2011 at 8:20
  • 1
    I believe a sane browser will NOT display the bb frame because an iframe cannot be nested inside an iframe. Commented Sep 5, 2011 at 8:38
  • @Salman A Okk I think I was doing it wrong.In the above situation it will never nest iframe inside other iframe.The browser first searches for a closing </iframe> tag of "aa" frame which happens to be of "bb" tag's.thats why "bb" tag was not rendered. Commented Sep 5, 2011 at 9:50

1 Answer 1

2

You can do this, however as each iframe is technically loading another page, you would have to code it into the actual webpage that your first iframe is loading.

To further explain...

<iframe name"aa"></iframe> <!-- this is coded into the first page calling the page below //-->


<iframe name="bb"></iframe> <!-- coded into the second page calling another page //-->
<iframe name="cc"></iframe> <!-- coded into the second page calling anothe page //-->

Remember, iframes are just "windows" into other pages.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.