Event on buttons of messagebox alert in designer

Abhishek110486

02-08-2011

Hi All,

How to write an event on the buttons of message box alert in designer?

xfa.host.messageBox("Enter Number","Validation",1,2);

This will prompt an alert.

"Enter Number" will be the comment.

"Validation" will be the title bar.

"1" means we are using warning as an alert

"2" means we are going to have 2 (Yes/No) buttons in alert box.

Please someone help me out to write an event on the (Yes/No) buttons.

If someone click on the yes then it should have done some  actiity and No then other set of activity.

Regards

Abhishek

View Entire Topic

Radhika_Magaji

10-08-2015

Hi Niall,

Is there a way to have just one OK button and the 'X' button to close the window? I tried with all combinations and i see that only when you have "OK" and "Cancel" OR "Yes", "No" and "Cancel" options(that is -  xfa.host.messageBox("Hello World!",3,1); or  xfa.host.messageBox("Hello World!",3,3);) is when u get the 'X' button to close.

I have a popup with a long message content which should just have one "OK" button. But since the message content is long, it is difficult to accommodate the "OK" button well within the monitor screen size.

Hence i am having to give - xfa.host.messageBox("Hello World!",3,1) so that i have the "X" button to either click or press "Esc" to close the popup.

Requirement is such that i need only "OK" button with the "X" option. The only action on clicking any of these will just be to close the popup.

Any help will be highly appreciated.

Thanks,

Radhika Magaji