This topic is locked

How to hide message created by 'Insert button' feature

11/18/2010 1:54:46 PM
PHPRunner Tips and Tricks
Sergey Kornilov admin

Let's say you have a button that retrieves a piece of sensitive info from the server that needs to be shown to the customer for a short period of time. After that this message needs to be hidden.
Here is the piece of code that goes to Button 'Client After' event and does the job.

// this message includes the SSN retrieved from the server

var message = result["txt"] ;

ctrl.setMessage(message);
// clear the message after 5 seconds

setTimeout(function(ctrl) {

ctrl.setMessage("");

}

, 5000, ctrl);