Expand my Community achievements bar.

Alert Box

Avatar

Former Community Member
I am new to Livecycle 8. A customer has a request for a alert box to appear with some instructions once a check box or radio button is selected. How do I go about executing this request.



Thanks in advance!
3 Replies

Avatar

Level 10
Hi Tammi,



You could use the app.Alert method in an if statement in the exit event of the checkbox or radio buttons. First set the binding on the object to 0 for off and 1 for on.



Then in the exit event, have the following:



if (this.rawValue == 0) {

app.alert({

cMsg: "Your message here. \n\nUsing backslash and n will give you spaces in the message box.",

cTitle: "Name of your organisation",

nIcon: 2, nType: 2

});

}



There are several examples in other threads.



N.

Avatar

Former Community Member
On the exit event of the checkbox - put this javascript code:



if (this.rawValue == 1){

app.alert("This is the text of the message")

}