This topic is locked
[SOLVED]

 Save button disabled

4/26/2017 7:34:39 AM
PHPRunner General questions
romaldus author

Using sample code from phprunner manual to ask confirmation before saving record:

https://xlinesoft.co...ving_record.htm

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){
if (confirm('Save record?')){
return true;
}else{
pageObj.delDisabledClass( pageObj.saveButton );
return false;
}
});


This code worked when i click the "OK" button but when i click the "Cancel" button (back to add form to correct some field) , then the Save button disabled.

How to keep the Save Button after click "Cancel" in confirmation box?

Sergey Kornilov admin 4/26/2017

Use the following (the manual will be updated shortly as well):

Runner.delDisabledClass ( pageObj.saveButton );
romaldus author 4/26/2017



Use the following (the manual will be updated shortly as well):

Runner.delDisabledClass ( pageObj.saveButton );



SOLVED.

Many Thanks