If you haven't named your windows it is still possible to reach them by their position in the frameset.length array. "parent.frames.location.href" would change url of one of the framewindows. parent.frames another and so on.
The frameset itself is the "parent" and very often also the "top" unless it is part of another frameset.
I believe, although I'm not 100% sure, that you can dedicate a name of the frameset itself, and reach it by using the name as in "myFrameName.history.back()".
Otherwise - try using "parent" or "top" before your action.