Show/Hide Toolbars

ASPRunnerPro 9.8 Manual

Navigation: Advanced topics > Programming topics > Javascript API > Examples

ASPrunnerPro32x32     ASPRunnerPro manual


How to ask for confirmation before saving a record

Scroll Prev Next More

 

To ask a user for confirmation before saving a record use the following code in Javascript OnLoad event for Edit or Add page.

yellowbulbNote: Change the values listed in red to match your specific needs.

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

if (confirm('Save record?')){

return true;

}else{

Runner.delDisabledClass ( pageObj.saveButton );

return false;

}

});

See also

Javascript API