JIM Control Usage Manual : Define Inline Window Attributes and Bounding
[ To Table Of Contents ]

Defining Where Inline Windows Can Be
Before inline windows can be used, you need to determine if you want to restrict where inline windows can be used at, or if you want to allow inline windows to be used anywhere on your web pages. If you choose to allow the inline windows to be used anywhere, you may wish to call the function wdocsize(). This function will automatically define the maximum area of the web page based on the user's screen resolution (so the user can use the entire screen area for inline windows). For example, to call this function, you may decide to place it in the <body> tag as:
<body onload="wdocsize();">

However, you can also define a specific region of the screen to be used for inline windows. This will restrict inline window activity to that region.
bound_region_x_min - This controls the minimum X coordinate where bounding begins.
bound_region_y_min - This controls the minimum Y coordinate where bounding begins.
bound_region_x_max - This controls the maximum X coordinate where bounding ends.
bound_region_y_max - This controls the maximum Y coordinate where bounding ends.

Defining Inline Window Attributes
One of the first things that you should consider is whether or not you want to allow users to drag inline windows around. You can enable and disable this feature by locating the variable called active_pad in the JIM Control source file (jim_control.js).

The next thing that you need to specify (in active_window_zindex) is the z-index that you want to have the newest inline window to have. Obviously you want this value to be higher in number than your other elements so the new inline window that comes up will be visible and not hidden behind something.

For resizing and dragging inline windows, you need to specify the following (usually the defaults will work just fine):
border_buffer - This controls the sensitivity in pixels around borders of your inline windows that the user can click on and drag.
bound_default_width - This controls the default size of inline windows that are created. Some functions in the JIM Control may adjust this value for the inline window to compensate for content being placed into it.
bound_default_height - This controls the default size of inline windows that are created. Some functions in the JIM Control may adjust this value for the inline window to compensate for content being placed into it.
height_pad - This holds a number that indicates how tall the window tab region is, in pixels. The window tab region is the area that allows the user to drag inline windows around and also holds other things, such as the title of the inline window.
ifrm_process - This controls how the inline window responds to iframe data inside of it by resizing itself around the iframe or resizing the iframe to the size of the inline window.

Special Offsets For Custom IFRAME Scaling Calculations
By default scaling of an IFRAME, if ifrm_process is set equal to 2, an X and Y offset is available that will further scale the IFRAME. These offsets (listed below) may be useful when you create an inline window with some type of padding to the left and right of the IFRAME (such as images).

x_ifrm_offset - Number of pixels to reduce iframes inside of inline windows. This variable offsets the width of the iframe.
y_ifrm_offset - Number of pixels to reduce iframes inside of inline windows. This variable offsets the height of the iframe.

In order to contain the IFRAME between such padding (such as in a three cell table where the second TD contains the IFRAME), you need to add up the width of the other two cells and place the negative equivalent of that value into x_ifrm_offset. The same process applies for y_ifrm_offset with the exception that it is designed to offset padding (such as an image) present below the IFRAME. It is important to note that in order for the offsets to be used, the window_ifrmname[] array element should contain the id of the IFRAME in question.