A number of other good reasons exist for wanting to access variables and functions in another frame. Two important reasons are to make your code modular and to gain the ability to maintain information between pages.
What does modular mean? In other programming languages, like C, C++, or Visual Basic, you can create a module — an area to hold general functions and variables — and reuse it from different places in your program. When using frames, you can put all of your general functions and variables into one area, such as the top frame, which you can think of as your code module. Then you can call the functions repeatedly from different pages and different frames.
If you put the general functions and variables in a page that defines the frames that it contains (that is, a frameset-defining page), then if you need to make changes to ...