Draggable Command Reference

Go to the boughner.us

Introduction

This command reference lists the commands that can be usee to allow popups in overLIB to be dragged around on your web page. Please read the core module documentation for more information about other ways to customize overLIB.

To include support for this plugin, just insert the following two lines in your HEAD section:

<script type="text/javascript" src="overlib.js"></script>
<script type="text/javascript" src="overlib_draggable.js">
</script>

Remember that commands are always in uppercase (case-sensitive) and can have none or up to two parameter values.

Download this module as a zip file.

Purpose

This plug-in introduces the commands needed to be able to drag an overLIB popup around on your web page. There are actually only three commands associated with this plugin. However, as explained below, a change from the way one of these commands works in the IE and Netscape browsers was needed for the Opera v7 browser because, apparently, the ALT key combination used in IE is not functioning correctly in Opera v7. Note: these commends can not be applied to a cross frame STICKY. The DRAGGABLE command is disabled if the popup and overlib code are in different frames or windows.

Commands

DRAGCAP example (see the next command's example)
This command only applies to a STICKY popup and when used on the command line, it switches the state of the associated default variable to its opposite state. The "grab" region is the CAPTION region of the popup, including the region occupied by the "Close" link, and the extra key(s) required by the DRAGGABLE command (i.e., ALT and/or CTRL) is not required; dragging is initiated by pressing and holding the left mouse button. While being dragged, the cursor changes to the 'move' cursor. Its default value is off (0). When this command is used, it is not necessary to also include the DRAGGABLE command because DRAGCAP automatically sets the draggable parameter on. Note, for this command to work, the Anchor plugin must also be loaded.
DRAGGABLE example
This command only applies to a STICKY popup and when used on the command line, it switches the state of the associated default variable to its opposite state. It indicates that this popup can be dragged and while it is being dragged, the cursor becomes the 'move' cursor except in the Netscape 4.x browser which doesn't allow the cursor to be changed. (There are also some problems in final release of the Opera v7 browser in displaying the 'move' cursor.) Default value is not to enable dragging (0). This command can not be applied to a CROSS FRAME STICKY. If it is, then this option will be disabled. A STICKY popup can only be dragged if it is in the same frame or window which contains the overLIB code.
Variable: ol_draggable
ALTCUT toggle DRAG key action
The normal way to drag a popup on the page is to press the ALT key (OPTION on a Mac) and hold down the left mouse button. This action enables one to select text within the popup in a normal way for cutting and pasting. However, by using the ALTCUT command on the command line, a user can drag a popup by just depressing the (left on a PC) mouse button. This command also switches the current state of the associated default variable to its opposite state. Default value is off (0). Apparently there is a bug in final release of the Opera v7 browser such that the event.altKey, which should indicate whether this key is being pressed during the event, always returns a false whether it is pressed or not. To compensate for this, I've changed the activating key to the CTRL key in this browser which is working correctly. However, in the final release, the cursor is not changing consistently to the 'move' cursor, although you can still drag the popup. I fully anticipate that once this version is released that this will have to be changed.
Variable: ol_altcut
DRAGIMG name  example two
Gives the image referenced by CAPICON a NAME (and an ID of the same value) so that it can be referenced and used to drag the popup around. Default value is the null string (''). For this parameter to work, the Reference Mark Module must also be loaded. If it isn't, then dragging works normally. There is no warning of this. Once dragging has been engaged, the user may release the activating key (ALT or CTRL) and continue dragging by just holding down the left mouse button (on a PC). Although this feature is working reasonably well, it should be considered experimental and subject to change. Note: the image doesn't have to be in the caption region of the popup. It can also be in the main body text, as demonstrated by example two, but here you are responsible for making sure that the name is the same as that specified by DRAGIMG as well as any other formatting that you want to provide. In this example, I employ the FUNCTION parameter to supply the string that is shown in the body text because I want to have access to the variable o3_dragimg to provide a name for this image.
Variable: ol_dragimg

Back to Top

 
 


Thank you for visiting boughner.us - Come back again soon.