WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 getElementsByTagName recursively through iframes, Michael Sheakoski, September 16, 2003
     Re:getElementsByTagName recursively through iframes, Erik Arvidsson, September 16, 2003
         Re:getElementsByTagName recursively through iframes, Michael Sheakoski, September 19, 2003
             Re:getElementsByTagName recursively through iframes, Erik Arvidsson, September 20, 2003

Subject: getElementsByTagName recursively through iframes From: Michael Sheakoski Date: September 16, 2003

Hello,

I'm trying to figure out how to access all of the select elements in a page including those which might be inside of an iframe.  Lets say I have the following document structure:

Main.html
<select>
       `--- Iframe
                  `--- Iframe
                   |         `--- <select>
                   ----Iframe
                             `--- <select>

How could I start from the main document, and recursively go through every embedded iframe and grab all the <select> elements and determines if it contains another <iframe> element in which I should further decend into?

I'm also trying to do something that is sort of opposite.  Lets say I have an Iframe that is nested 5 levels deep within other iframes.  Is it possible to write a function in the deepest level (5) iframe and have it count how deeply nested it is until it gets to the main document?  In other words a way to figure out from within the iframe if it has other iframes containing it.

My target audience is IE so any advice that is standards based or IE based would be greatly appreciated.

Thank you,
Michael Sheakoski




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX