Javascript closeFrame - jcobban/Genealogy GitHub Wiki
Up: Javascript Global Services
Source: /jscripts/util.js
function closeFrame(lastChoice)
Parameters:
- lastChoice
- a string containing a URL. If specified and there is no page to revert to in the history stack, the page specified by this URL string is displayed.
To avoid cluttering up the user's screen the application splits the window vertically into two frames and displays a maximum of two pages at a time. This function closes the page in the current frame and sets the focus in the frame in the opposite half of the window.
If the current window is in an <iframe>, which is the case if the page was opened in either the "left" side or the "right" side of the browser window, then the function blanks out the <iframe> and decreases its z
coordinate so that it is put "behind" all of the other frames in its half of the browser window. This makes the page invisible.
If the current window is not an <iframe> but the current contents are the result of a call to window.openWindow
then the application which did that call is restored from the history. If there is no page in the history to revert to then it displays the main genealogy entry page, or the page identified by the lastChoice
parameter if specified.
Otherwise the current window is closed.