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

Q591 How do you reload a page in frame 2 from frame 1?

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

Try something like:

<A HREF="javascript:parent.framename.location.reload()">Reload</A>

where framename is the name of frame 2.

Alternatively, you can use the frame index number (1st frame is 0, 2nd frame is 1..., nth frame is n-1), combined with a simple test to see if the browser supports the locaton objects reload() method:

<script language="JavaScript"><!--
function reloadFrame(number) {
    if (document.images)
        parent.frames[number-1].location.reload();
    else
        parent.frames[number-1].location.href = parent.frames[number-1].location.href
}
//--></script>

<a href="javascript:reloadFrame(2)">Reload</a>

Feedback on 'Q591 How do you reload a page in frame 2 from frame 1?'

©2018 Martin Webb