dynamicreport.com News Member Login Knowledge Base Site Map
Support Support Ticket Contact Us
Products Drag & Drop Objects Drag & Drop Calendar UNIGEN Web Reporting Code View
Testimonials Downloads
Order


Drag and Drop Objects

Login

UNIGEN

ddobj

News



Drag and Drop Objects Framework

 

Included with ddobj are the instructions on incorporating this simple to use DHTML component into your static/dynamic Web pages. Detailed instructions explain the basic implementation of HTML for modifying the appearance of ddobj windows with custom template layouts (skins). An example Web page is included to demonstrate the use of ddobj. Spruce up your Web pages in no time!

Objects can be applied to any events in order to trigger their functionality. View the demonstration page.

Compatibility:

ddobj has been tested and is compatible with early versions of Netscape and current popular Web browsers including:

  • Microsoft Internet Explorer
  • Netscape 6+
  • Netscape Communicator 4.xx
  • Mozilla-based browsers (eg. Firefox)
  • Opera
  • Safari (Mac)
  • Konqueror (Linux)
  • etc.
Through exhaustive testing and use we continually seek to improve our product! If you would like to request a feature or ask if a particular feature is supported then please contact us.

This script is currently in use in various applications including online systems implementing interactive help, online courseware, e-books and Web pages using inline pop-ups, tooltips and drag-and-drop windows and widgets.

Examples of use:

  • Tooltips :: Appearing on Web pages or e-books over any hyperlinked content including images and text for verbose information
  • Drag-and-drop windows :: Multiple placeable window objects when lookup or reference is necessary
  • Pop-up windows :: Advertise effectively against pop-up blockers, less annoyance to visitors by means of inline windows (layers)
  • Surveys, Polls, Quizzes & Answers :: Dialogs for answering questions in forms or displaying answers to questions in popup windows.
  • Tools and Widgets :: Calculators, calendars, games, time and date, news postings, interactive tools, etc.
  • Prompts and Alerts :: Obtain input from custom window forms or display custom data entry error message windows.

Bundled with ddobj are example pages that exhibit the use of window objects on a Web page. The wizard provides an intuitive user-interface that generates source code and working window/tooltip examples based on the visual selection of options through the various drag and drop object parameter controls. The generated code may be copied and pasted into a new or existing HTML Web page file. The wizard provides customization of the object's essential functionality. However further customization will require examining the example page (ddobj.html) and reading through the information contained in the documentation.

Developers familiar with basic javascript may be interested in the capabilities of the drag and drop objects through parameter passing. The wizard essentially generates the object code with parameter assigned values from the user-interface options. Each object instance can be assigned property values by calling function params(). The function receives an associative parameter array with the object property name identifier followed by a value assignment using the colon ":" operand. Note that the information below is useful to anyone implementing the window objects either by use of the wizard to generate code or hard entering the code into Web page(s).

 



Examples and ddobj API

 

Example of parameter passing to the first drag and drop object instance of an array of objects:

dd_obj[0].params({OPACITY_ON : 70}); // parameter passing
dd_obj[0].show(1, "<p>Caption</p>", "<p class = 'dd_content_blk'>Content of drag and drop window.</p>, 150); // show the object
dd_obj[0].release(); // release the tooltip as draggable object

Example of a drag and drop object on a Web page
Tooltip over link (onmouseover), released object (onmouseout):

<a href = "#" onmouseover = "dd_obj[0].show (1, '<p>My Caption</p>', '<div>Content of Window</div>', 300); return false;" onmouseout = "dd_obj[0].release (); return false;" onclick = "return false;">
  Place mouse cursor over link to activate tooltip, move mouse outside link to release
</a>

Drag and Drop Object (ddobj) Parameters

The following parameters may be passed to objects by the above means:

NORESETobject specific flag to enable/disable object trigger reset (true or false)
IGNORE_SHOWHIDEnext function call to object's show() or hide() functions will exit immediately if set, flag is then cleared so that the functions can execute the next time either is called
OFFXtooltip X offset from cursor
OFFYtooltip Y offset from cursor
DRAGALLenable or disable full or partial drag region (true or false)
DRAGenable or disable draggable object property (true or false)
DRAG_DELAYdefault value of false ends the auto-hide delay of this object if a drag operation is initiated; true = resume delay of object following the end of a drag operation
CONTROLenable or disable the control panel object, which contains the close button and/or other elements (true or false)
CURSORspecifies a cursor name for the drag icon (default: "move")
LIMIT_Tlimit top edge (-1 = top window edge, 0 = no limit, positive whole number = custom edge)
LIMIT_Llimit left edge (-1 = left window edge, 0 = no limit, positive whole number = custom edge)
LIMIT_Rlimit right edge (-1 = right window edge, 0 = no limit, positive whole number = custom edge)
LIMIT_Blimit bottom edge (-1 = bottom window edge, 0 = no limit, positive whole number = custom edge)
AUTOXauto adjust horizontal offset of tooltip to opposite edge if boundary is touched (0 = no limit, 1 = auto limit, -1 = force edge)
AUTOYauto adjust vertical offset of tooltip to opposite edge if boundary is touched (0 = no limit, 1 = auto limit, -1 = force edge)
Xinitial left-most position of the object on the Web page document (-1 = dynamic based on cursor and offset)
Yinitial top-most position of the object on the Web page document (-1 = dynamic based on cursor and offset)
Wfixed width of the object
ANCHORweb page element ID string
ANCHOR_Wanchor to object width (true or false)
ANCHOR_Hanchor to object height (true or false)
REWRITErewrite object skin layout, caption and content (true or false), default: true (rewrite always), static object content, objects not shared: use 0 to avoid rewriting static object content
SKINskin index value indicating which skin is used for the object
FLASHOBJindication that an object contains embedded Flash content
OPACITY_ONopacity of the object on focus (percentage value 0-100)
OPACITY_OFFopacity of the object off focus (percentage value 0-100)
OPACITY_INinitial opacity of the object (percentage value 0-100)
OPACITY_STEPgradual opacity adjustment during the fade transition
FADERESETreset object fading when focus is lost (true or false)
RESET_PARAMSreset all object parameters to the defaults (1, 2), where a value of 2 will not reset the value contained in the object's noreset property
PARENTspecify parent object index of this object (the child), a value of -1 indicates no parent by default
PLOCindicates whether or not the child node object should snap to the parent node object location before taking into account this object's specified offset (true = snap, false = default no snap)
PWX offset child node location to parent width (parent index equals 0+ and ploc must be set)
PHY offset child node location to parent height (parent index equals 0+ and ploc must be set)

Drag and Drop Object (ddobj) Methods

The following object methods set or get attributes specific to a ddobj object instance:

show(...)display the drag and drop object with a chosen skin at the mouse cursor or pre-defined position
hide(...)hide the drag and drop object - if the object is already in control, avoid interruptions/ignore hiding the object unless object hide is forced by the force parameter (true or false)
params(...)pass any number of parameters to the drag and drop object
release()signals that an object is not to be locked onto the motion of the mouse any longer - this is the case with the drag-and-drop objects in the example where the onmouseout or onclick events of the link will detach the objects from mouse tracking until they are put in motion by a drag operation
resetHide()reset automatic object hide delay so that an object disappears after the delay specified in variable dd_pkg.delay_hide has been reached - the delay of the popups can be assigned by setting the value of constant variable dd_pkg.delay_hide = #; where the value of # is in tenths of a second (E.g. 200 would equal a delay of 2 seconds)
setW()set the pixel width of the object (on demand)
getX()return the y coordinate of the object at its absolute pixel location on the screen
getY()return the x coordinate of the object at its absolute pixel location on the screen
getW()return the width of the entire object in pixels
getH()return the height of the entire object in pixels
getVis()return the current visibility of the object, which equates to either constant set_hide or set_show
vis(flag, force)sets the visibility of an object according to flag, which may equate to either constant set_show or set_hide - the boolean force parameter is optional, and may be either true or false - a value of true will force the visibility regardless of any condition that would otherwise terminate the visibility from being set prematurely
setControls(...)send custom content markup to control panel object defining what icons and functions should appear

The following callback prototype functions can be declared for extending ddobj functionality. These extended object methods enable custom application development of any type of drag and drop interface on your Web page:

cbhide()drag and drop object prototype method (on object close/hide)
cbdown()drag and drop object prototype method (on button down object drag activation)
cbup()drag and drop interface prototype method (on button up object drag de-activation)
cbmove()drag and drop interface prototype method (on move object drag)

 

 

 


Download
Get This Script.

 



 

Copyright © 2007-2008 Interaxis. All rights reserved.
Contact Webmaster