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

Q895 Using a form button can I make the current frame and another frame go back on page in their respective history objects?

You are here: irt.org | FAQ | JavaScript | History | Q895 [ previous next ]

The following will go back in the current frame:

<form>
<input type="button" onClick="window.history.back()" value="Back">
</form>

The following will go back in another frame:

<form>
<input type="button" onClick="parent.otherFrameName.history.back()" value="Back">
</form>

The following will do both at once:

<form>
<input type="button" onClick="parent.otherFrameName.history.back();window.history.back()" value="Back">
</form>

©2018 Martin Webb