Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q592 How can I read the contents of another frame?

You are here: irt.org | FAQ | JavaScript | Frame | Q592 [ previous next ]

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.

©2018 Martin Webb