Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How do I create a confirm box?

Avatar

Level 4

Hello!

How do I create a alert confirm?

Example: When the user to click on the button, show message: Do you have sure to send this e-mail? Yes or No

If it to click on the Yes, send e-mail else no send e-mail.

Is it possible?

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can do it using the messagebox method..

Place the below code in a click event of button and test.. You can place your code in the Yes section of the condition.

if(xfa.host.messageBox("Do you have sure to send this e-mail?", "Send Email Confirmation", 2,2) == 4){

//User Selected Yes. Do your processing for Sending the email.

xfa.host.messageBox("Email has been Sent");

}

else{

//Do your processing for No.

xfa.host.messageBox("Email is not Sent");

}

Thanks

Srini

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

You can do it using the messagebox method..

Place the below code in a click event of button and test.. You can place your code in the Yes section of the condition.

if(xfa.host.messageBox("Do you have sure to send this e-mail?", "Send Email Confirmation", 2,2) == 4){

//User Selected Yes. Do your processing for Sending the email.

xfa.host.messageBox("Email has been Sent");

}

else{

//Do your processing for No.

xfa.host.messageBox("Email is not Sent");

}

Thanks

Srini

Avatar

Level 4

Thanks so much, but Can I use with Javascript? Can you give me a example it?

Avatar

Level 10

Yes, it is a javascript code.

Donate your credits to Srini for this useful info.

Nith

Avatar

Level 4

Yeahh!!

It works! Sorry, but I am still a newbier user

Thanks so much guys!