Value Over Loaded "alert massage" By JavaScript

 

Container Over Loaded!!

Step 1 :
Go to page -->  Function and Global Variable Declaration

function  overLoad(){
    let capacityCbm =   $('#P312_CAPACITY_CBM').val();
    let totalAdded =   $('#P312_TOTAL_ADDED').val();
    let capacityCbmParse = parseFloat(capacityCbm) ;
    let totalAddedParse =  parseFloat(totalAdded) ;
  console.log(capacityCbmParse, totalAddedParse)
  if (capacityCbmParse != null && totalAddedParse > 0){
  if (totalAddedParse >= capacityCbmParse){
        alert('Container Over Loaded'); 
        document.getElementById("myBtn").disabled = true;     
    }
   else{
         document.getElementById("myBtn").disabled = false; 
   }
  }
  else{
        
null
  
  }
}

Step 2 :

Select P312_CAPACITY_CBM & P312_TOTAL_ADDED
Custom Attributes: onchange="overLoad();"

Step 3 :

Select Create Button and Static ID: myBtn


-------------------------------------------------------------------------

2nd Option 

Validation
========

IF :P318_CAPACITY_CBM <= :P318_TOTAL_ADDED
THEN return false;
else return true;
end if ;

Error Message : Container Over Loaded!!

Post a Comment

Previous Post Next Post