Show/Hide Toolbars

PHPRunner 9.8 Manual

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

PHPrunner32x32     PHPRunner 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;


Runner.delDisabledClass ( pageObj.saveButton );

return false;



See also

Javascript API