Documentation

onBeforeAdd

fires before adding item to datastore

boolean onBeforeAdd(string|number id ,object obj,number index){ ... };

Parameters

id string|numberid of the newly added data item
objobjectdata for new item
indexnumberindex, at which new item will be added

Returns

booleanfalse if operation need to be blocked

Example

$$('some').attachEvent("onBeforeAdd", function(obj, index){
    if (obj.text == "")
        return false;
});

See also

Back to top