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
Solved! Go to Solution.
Hi,
if you add a variable the xfa.host.massageBox call returns the button that was pressed.
for example
var retFromBox = xfa.host.messageBox("Enter Number","Validation",1,2);
the retFromBox variable will be one of the following
Hope this helps
Malcolm
Hi,
if you add a variable the xfa.host.massageBox call returns the button that was pressed.
for example
var retFromBox = xfa.host.messageBox("Enter Number","Validation",1,2);
the retFromBox variable will be one of the following
Hope this helps
Malcolm
Hi Malcolm,
Thanks for your quick reply. I am able to write event on the button click of messagebox.
Can i able to creae my own customized button in this message box?
Consider if i want to create two buttons in message box "Ok" and "Edit" is it possible with live cycle designer?
Regards
Abhishek
Hi,
No the messagebox is limited to what is in the help.
If you are creating a PDF ( viewed in Acrobat or Adobe Reader) then you could create your own dialog to do this, to create your own dialog you would have to use the Acrobat JS Guide, specifically the "app.execDialog" function, but this is fairly complex and requires a lot more coding than xfa.host.messageBox.
The Acrobat JavaScript guide is here if you want to investigate further
http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/JS_API_AcroJS.88.136.html
Hope this helps
Malcolm
Views
Replies
Total Likes
Hi,
Another way to easily use the execDialog method is to use a very handy Acrobat plugin from WindJack Solutions: AcroDialog http://windjack.com/product/acrodialogs/
I use it all the time for custom dialogs.
Niall
Views
Replies
Total Likes
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
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies