Detailed Usage Instructions for Functions in
"clc_window.js"
List of Functions
Detailed Usage Instructions
Browser_Window CLC_Window()
Input parameters:
Return parameter:
- Browser_Window - This is the currently active window
that has the focus.
Error messages:
Additional notes:
- This function returns the currently active window and
should be used in almost all situations instead of
window._content. The reason for this is window._content
always refers to the entire browser window, which is the
wrong window to use when dealing with frames. If there are
frames on a page, all the content is in the frames and
trying to access it directly through window._content will
not work.
- CLC_Window() should always work since if there are no
frames on the page, CLC_Window will return window._content,
and if there are frames it will return the active, focused
frame which acts like a window (think of it as if you had
opened the active, focused window in its own browser window
so that you are no longer dealing with frames).
- Example: CLC_Window().document.body.childNodes[0]
should be used instead of
window._content.document.body.childNodes[0]. For a page
with no frames, they will behave exactly the same. For a
page with frames, the code that uses CLC_Window will
process the active frame correctly, while the one that uses
window._content will fail since it cannot locate
document.body.childNodes[0] under it.