Question

Messagebox to display a popup box requesting user to confirm some situation

Hi All,

We need to know if there some more specific and not elegible to hide by users to display a Messagebox to with a popup box requesting user to confirmm som situation, we use confirm(), but the navigators give choice to user to hide this kind oo popup

Thanks in advance

if ( confirm("AVISO\n\nVa a cerrar Solicitud de Intervención con una o mas Solicitudes\n" +
"de Seguimiento. El sistema cerrará TODAS las solicitudes relacionadas\n\n" +
"está seguro de continuar" ) === true ) {
// Cierra toda la cadena
// PENDIENTE, NO FUNCIONA CAMBIO ESTADO

} else {
// Usuario decide no cerrar, por lo que vuelve a abierta
this.CambiaEstadoSolicitud( "Abrir" );
}

File attachments

Like

2 comments

Dear Julio,

 

We usually use the showConfirmationDialog method for the task that you described.

Please check the example below.

 

checkCanDeleteCallback: function(result) {

if (result) {

this.showInformationDialog(resources.localizableStrings[result]);

return;

}

this.showConfirmationDialog(this.get("Resources.Strings.DeleteConfirmationMessage"),

function(returnCode) {

this.onDelete(returnCode);

},

[this.Terrasoft.MessageBoxButtons.YES.returnCode, this.Terrasoft.MessageBoxButtons.NO.returnCode],

null);

},

 

onDelete: function(returnCode) {

if (returnCode !== this.Terrasoft.MessageBoxButtons.YES.returnCode) {

return;

}

this.onDeleteAccept();

},

 

 

Best regards,

Diana Adams

Thanks Diana,

Finally, using your sample, we implements the following code, changing the text of the buttons according our needs and with the help of Eugene. Thanks!!

this.showConfirmationDialog( "AVISO\n\nVamos a cerrar todas las hijas, seguro de querer continuar?", 
	function( returnCode ) {
		if ( returnCode === "Aceptar" ) {
			// Here goes code to do when user clicks on OK or equivalent string

		} else {
			// Here goes code to do when user clicks on Cancel or equivalent string
				
		}
	}, [ { caption:"Aceptar",
				className:"Terrasoft.Button",
				markerValue:"Aceptar",
				returnCode:"Aceptar" },
		 { caption:"Cancelar",
				className:"Terrasoft.Button",
				markerValue:"Cancelar",
				returnCode:"Cancelar" } ] );

 

Show all comments