Monday, November 26, 2018

common alert syntax with sample

function validated(){
if(frmTest.text1.text === null || frmTest.text1.text === "" || frmTest.text1.text === undefined || frmTest.text1.text === " "){
CommonAlrt("Please Enter text");
}
}
function CommonAlrt(response)
{
var basicConf = {message: response,alertType: constants.ALERT_TYPE_CONFIRMATION,alertTitle: "Sample Alert",yesLabel:"yes",
noLabel: "no", alertHandler: alertres};
var pspConf = {};
var infoAlert = kony.ui.Alert(basicConf,pspConf);
 
}

function alertres(response){
  if(response){
  alert("its working yes");
  }else{
    return false;
  }
}

0 comments:

Post a Comment