Prevent changing of select values based on wn.confirm

Hello All,

i want to prevent the changing of select values based on the wn.confirm output.

my code :

cur_frm.cscript.company = function(doc, cdt, cdn){
wn.confirm("Do you want to change select value ? ", YesAction(doc,cdt,cdn), function(){
 // here i want, if i select No, i dont want the company value to be reset back ??
});
}

You will have to save the values before they are changed. Maybe on the refresh trigger, so that you can set it back.