confirm

"confirm" The Confirm function is a quick and easy way to ask the user a yes/no question. It pops up a question modal onto the screen allowing the user to wither confirm or cancel. This is most often used when verifying that a user is willing to allow some operation to be performed

Format:

confirm(text)

Parameters:

Parameter Type Description
text string  [Optional]The text to display i.e. the question. defaults to "Are you sure?"

Returned Value:

Type Description
boolean Returns TRUE or FALSE depending on the user's response.

Examples

 if( confirm("Do you REALLY want to delete it?") ) {
     delete(my_item)
 }
 

Screen Shots