Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q592 How can I read the contents of another frame?

irt.org | Knowledge Base | JavaScript | Frame | Q592 [ previous next ]

Q592 How can I read the contents of another frame?

Only in Internet Explorer 4 by the use of the document.all() object. For example:

<script language="JavaScript"><!--
function extract() {
    if (document.all)
        for (var i=0;i < parent.frameName.document.all.length; i++)
            if (parent.frameName.document.all(i).tagName == 'TABLE')
                alert(parent.frameName.document.all(i).outerHTML);
}

extract();
//--></script>

But this only works if the JavaScript and the CGI program are located on the same server.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.