onDX5BeforeItemsAdd
-
Version 1.0.0.0 or later
-
Explanation
The onDX5BeforeItemsAdd function is a callback function that is called before adding items.
If the return value of the function is true or undefined, individual job to add a item starts. On the other hand, if you explicitly return false value, all future adding operations will be canceled.
function onDX5BeforeItemsAdd(id, count) { return confirm("Do you want to add " + count + " item(s)?"); } -
Uses
# Declare event handlers globally function onDX5BeforeItemsAdd(id, count) { ... return true; // or false } # Register event handlers at component creation time (3.10.0.0 version or later) dx5.create({ ... events: { beforeItemsAdd: function(id, count) { ... return true; // or false } } }); -
Parameters
Name Type Explanation id String The component id of the event count Number Number of files to add -
Return
true, false
onDX5ItemAdding
-
Version 1.0.0.0 or later
-
Explanation
The onDX5ItemAdding function is a callback function that is called before adding an individual item.
If the return value of the function is true or not defined, then the adding operation continues. On the other hand, if you explicitly return a false value, the item is not added.
function onDX5ItemAdding(id, obj) { return confirm("Do you want to add " + obj.name + " item?"); } -
Uses
# Declare event handlers globally function onDX5ItemAdding(id, obj) { ... return true; // or false } # Register event handlers at component creation time (3.10.0.0 version or later) dx5.create({ ... events: { itemAdding: function(id, obj) { ... return true; // or false } } }); -
Parameters
Name Type Explanation id String The component id of the event obj Object It is a JavaScript File or a blob object. -
Return
true, false
onDX5ItemsAdded
-
Version 1.0.0.0 or later
-
Explanation
The onDX5ItemsAdded function is a callback function that is called after adding job is completed.
function onDX5ItemsAdded(id, count, arr) { alert(count + " item(s) added."); } -
Uses
# Declare event handlers globally function onDX5ItemsAdded(id, count, arr) { ... } # Register event handlers at component creation time (3.10.0.0 version or later) dx5.create({ ... events: { itemsAdded: function(id, count, arr) { ... } } }); -
Parameters
Name Type Explanation id String The component id of the event count Number Number of added items arr Array (versioin 3.3.2.0 or later) The array of registered item's ids