validateLine(type)
validateInsert(type)
validateDelete(type)
validateInsert(type)
validateDelete(type)
Each of the client events mentioned above return a Boolean to indicate if the operation proceeds or not. For instance, if the validateLine() function returns true, then a new line item is added to the sublist. If false, then the add operation cannot proceed.
The following code illustrates this concept:
// validateLine
function validateLine(type)
{
alert('validateLine: cannot edit the current line or add a new line');
return false;
}
// validateInsert
function validateInsert(type)
{
alert('validateInsert: cannot insert a new line');
return false;
}
// validateDelete
function validateDelete(type)
{
alert('validateDelete: cannot delete any line items');
return false;
}
function validateLine(type)
{
alert('validateLine: cannot edit the current line or add a new line');
return false;
}
// validateInsert
function validateInsert(type)
{
alert('validateInsert: cannot insert a new line');
return false;
}
// validateDelete
function validateDelete(type)
{
alert('validateDelete: cannot delete any line items');
return false;
}
No comments:
Post a Comment