confirm

The confirm() method displays a dialog box with a specified message, along with an OK and a Cancel button.

 

Boolean=window.confirm(String DisplayText) ;
Boolean=window.confirm(String MessageId,String DisplayText);
Boolean=window.confirm(String MessageId,String DisplayText,Object PlaceHolder);

 

window.confirm("Continue?");

 

You can use this command without window prefix

 

let a=confirm("Continue?");
if(a==true) alert("We continue!");

 

If you define the Message Id, the system use the text from Message translation system

 

let a=confirm("deleteEntry","Delete Entry?")

 

 

Working with Placeholder

Messages support place holders in text <placeholder>

 
let quantity=10.3;
// Message mrpminordr33 (Standard is german) has placeholder "menge", which present the quantity
// we convert the quantity Number to quantity string for Unit Pcs and replace the place holder in translated text
let r=confirm("mrpminordr33",
  "Mindestbestellmenge ist auf <menge> gesetzt. Soll die Eingabe hochgesetzt werden?",{menge:quantity.toString("Pcs")} );
if (r==true) {
   // calculate ...
   }

 

confirmExample

 

 

Server mode:

In server mode the function return always true and don't display a message