I am creating a health care application that needs to be HIPAA compliant. I want to only display a client's SSN temporarily when a button s pressed otherwise it just displays only the last 4 digits of the SSN. I have added the button and all works well, except that I don't know how to clear the message that displays the SSN. I tried the following:
function OnAfter(result,ctrl)
{
// this message includes the SSN
var message = result["txt"] ;
ctrl.setMessage(message);
// clear the message after 5 seconds
setTimeout("clearmessage()", 5000);
function clearmessage()
{
var message = "" ;
ctrl.setMessage(message);
}
}
Do you all know what I might be doing wrong or another way of accomplishing my objective?