xfa.host.messageBox

I would like to use the function


xfa.host.messageBox ('BLACK' ","MY COLOR", 3, 1);


to display an alert message if the Text1 field is equal to the 'BLACK '.

or

to display a warning if the Text1 field is equal to "YELLOW"

or

to display an alert message if the Text1 field is equal to "GREEN".


TKS

Advertisement

Okay, well you can just have if statements to the output value wanted:

If (text1.rawValue == 'BLACK') {}

xfa.host.messageBox ("BLACK", "MY COLOR", 3, 1);

} Else if (text1.rawValue == 'YELLOW') {}

xfa.host.messageBox ("", "MY COLOR", 3, 1);

} Else if (text1.rawValue == "GREEN") {}

xfa.host.messageBox ("", "MY COLOR", 3, 1);

}

I hope this helps!

Tags: Adobe LiveCycle

Similar Questions

  • Use xfa.host.beep to trigger two consecutive beeps?

    Looks like it should be simple enough, but apparently not.

    I tried different combinations, place xfa.host.beep (1) in:

    -consecutively in the click event of the button.

    -separately in the mouseUp event and click;

    -place xfa.host.beep in a function and two calls to the function

    -call to the function then xfa.host.beep (1);

    Even tried xfa.host.beep (1) in the click event of Button1, and then click hidden event execution button 2, which contains xfa.host.beep (1).

    All work around suggestions? Thank you!

    Brian

    Hi Brian,.

    Try this;

    XFA. Host.Beep (1)

    app.setTimeOut ("xfa.host.beep (1)", 500);

    Who calls the beep, then half a second (or 500 m/s) later he calls again.

    Concerning

    Bruce

  • xfa.host.exportData("",0); may not work in adobe reader, why?

    Form1. Config.Button1 [0]: click - (JavaScript, client)

    xfa.host.exportData("",0);

    export .xml file, it works in format adobe acrobat, XI.

    In adobe reader, click on the button, may not work.

    Why?

    Thank you ~.

    Player cannot export data from form unless the document has been activated with the use of import/export of straight form with LiveCycle Reader Extensions. Acrobat cannot activate the document with this right of use.

  • xfa.host.setFocus (); beep problem

    xfa.host.setFocus (Expand); is placed below the text field. When cursore enters the field 'expand', a tone is created.

    How can I stop it?

    Hello

    All the sounds you hear using created LiveCycle Forms is sounds generated by your operating system - not PDFcreated and therefore not controlled by the authoring software. Sounds can be changed in the control panel - system sounds. There are no other ways to overcome what I know.

    I know that the fact that this has - I did not like it. However, I changed my sound Setup using a theme provided by Win7 and have a much more enjoyable experience. But all users can hear what they hear, according to the settings on their operating system. I have no control over this part of the user experience.

    Good luck!

    Stephen

  • function xfa.host.exportData

    Hi all

    I have a problem with the xfa.host.exportDatafunction:


    My script is as follows:

    -J' made a form with several fields.

    -A user determined open this form and fill in the fields.

    -That the user is able to send the form via PDF or save in XML format.

    In Acrobat 8 Professional, there is no problem to make these features but in Acrobat Reader 9, the user cannot save data in XML format.

    I placed the xfa.host.exportData("",0) function in the click event of a checkbox.

    I would like to know if it is possible to get the same functionality in Adobe Reader as Adobe Professional.

    Thanks in advance.

    Best regards.

    Hello

    You can apply rights Reader Acrobat 9 Standard or above, but these are limited.

    LiveCycle Reader Extensions is a server product, which is part of the suite LiveCycle. See here:

    http://www.Adobe.com/UK/products/LiveCycle/readerextensions/

    It does not require Acrobat in particular, because it is not 'on' for installed Acrobat. You must contact Adobe sales at your location to know the costs and components required.

    If you want to export the XML data, then you are looking at all the users with the full version of Acrobat (option 1) or you want to apply rights to drive using LC Reader Extensions (option 4).

    Hope that helps,

    Niall

    Ensure the dynamics

  • xfa.host.gotoURL () in Adobe Reader / dynamic Tables to AcroForms?

    Hi all

    I have a dynamic array in my form of life cycle. Each row in the table contains a button that connects to an external PDF file (using xfa.host.gotoURL). The links work fine in Acrobat Pro 8, so far, so good... But when you click on the buttons in Reader 8, nothing happens. No error message or a security warning, nothing...

    I searched on the web and some forums for this problem and read between the lines of some posts, I came to guess that my lifecycle of the form will not work in Adobe Reader unless I have purchase the license of life cycle of the respective Extensions... :-/

    What exactly are my options now? I cannot get the buttons to work in Adobe Reader somehow (using JS) without having to buy the Reader Extensions? Or can I somehow to recreate the dynamic table of the form of the lifecycle using AcroForms in Acrobat 8 Pro to avoid the problem I have? If so, how can I add such a table using Acrobat form... Tools?

    Thanks for your help,
    Marcus

    You can use:

    app.openDoc (FilePath.rawValue);

    to open another form of Adobe.

  • How to perform an action when the user clicks on the "OK" button on a script by xfa.host.response

    Hello

    I have a script that when you exit a field without the user data that a script response is mentioned.

    When the user has entered the required data in the dialog box and click the OK button I wish that the data user in the field as a value.

    Please can someone tell how this is possible?

    The script is listed as follows:

    If this field is stopped without the user to enter data, the following message is displayed

    If

    (Employee_ID.rawValue == null)

    {

    XFA. Host.Response ("is a required field, enter your employee id');

    }

    Hello

    I think that this script will do the job:

    If (this.rawValue is nothing)

    {

    var id = xfa.host.response ("is a required field, enter your employee id');
    this.rawValue = id;
    }

    Yan.

  • xfa.host.exportData)

    Hi, in Designer script reference, the export method of data,

    It is said that the parameter 1 (filename) is valid only if it is a "document certified where user has sufficient permissions".

    what he means by "certified document"?

    How can I do a certified document?

    Thank you

    Thus, the "certified document" means the PDF form that I try to export the form data?

    Yes.

    It is not on the file XML (or XDP) resulting from the action of export?

    N °

    and if I don't have Acrobat Pro, I can't use the parameter #1 the export method then?

    Fix. You need Acrobat or LiveCycle ES.

    still do not understand the reason why it doesn't allow me to specify the output file name when the document is not certified

    Security. Imagine a scenario where anyone could send you a PDF file which writes a file .bat on your hard drive and takes the file system or re-written the registry.

    Steve

  • Place a value from a response from the host of xfa to a text box form field

    I have a form of annual leave, which has many types of leave to select with check boxes.

    If the annual leave checkbox is marked then a message box will prompt the user if the holidays should be included.

    The user fills out the response field with the number of holidays included in a period of leave.

    I would then input from the user (number of holidays) of the field to be placed in a separate box on the response form.

    The message box and answer box seems to work as it should, but I can't work, how to get the value of the answer in the text box.

    Can someone please tell you to modify my script as follows:

    If (Annual_Leave.rawValue == '1') then

    If ($host.messageBox ("your authorization request includes the holidays?', 'Holidays', 2, 2") == 4) then

    Public_Holiday.value = $host.response ("Enter the number of included holidays during your leave!", "number of holidays")

    on the other

    ""

    endif

    on the other

    ""

    endif

    Hello

    I developed a form with javascript code,

    Code goes here

    Form1. #subform [0]. Button1::click - (JavaScript, client)
    if(TextField1.RawValue==1)
    {
    var p = xfa.host.messageBox ('your authorization request include holidays?', 'Holidays', 2, 2);
    if(p==4)
    {
    var q is xfa.host.response ("Enter the number of holidays included during your leave!", "number of holidays");.
    TextField2.rawValue = q;

    }

    }

  • closing a form after a box of xfa.hostmessage Javascript

    I have a form with a checkbox which, when activated, displays an error message using Javascript xfa.hostmessage on the click event.  I want the form to close after clicked 'OK' the Javascript warning box.

    I tried to add an app.execMenuItem (Close); script after script xfa.hostmessage box, but it did not work.  I also tried the app.execMenuItem (Close); the output of the box event script, nothing will do.

    Is it still possible?  Any help is greatly appreciated.

    Hello

    the massageBox method has a return value, you can use to determine if the user clicked OK or not.

    if (xfa.host.messageBox("Close Doc?", "Close Doc", "2", "1") === 1) {
              event.target.closeDoc(false);
    }
    
  • Event on the messagebox in the designer alert buttons

    Hi all

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

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

    This will get an alert.

    "Enter the number" will be the comment.

    'Validation' will be the title bar.

    '1' means that we use as an alert warning

    the buttons '2' means, we will have 2 (yes/no) in the alert box.

    Please someone help me write an event on the buttons (yes/no).

    If someone clicks on Yes, then he should have done a few actiity and then others no set activity.

    Concerning

    Abhishek

    Hello

    If you add a variable to the xfa.host.massageBox call returns the button which was pressed.

    for example

    var retFromBox = xfa.host.messageBox ("Enter the number", "Validation", 1, 2);

    the variable retFromBox will be one of the following

    • 1 (OK)
    • 2 (cancel)
    • 3 (no)
    • 4 (Yes)

    Hope this helps

    Malcolm

  • How to simulate the form-update which is used by messageBox

    Hello

    I use a script object to my function to add/remove lines in my PivotTable.

    If I do NOT use the messageBox whenever I call the function, I get some problems with my index of the table. T

    It would be too difficult to describe all aspects of my code, so let us cut a long story short.

    MessageBox is a kind of update the form. How can I simulate this update without using messageBox?

    XFA. Form.Recalculate (1); does not at all help

    function addORremoveRow (myCheckBoxAsObject) { }

    xfa.host.messageBox ("without me any updated!");

    ... If checkBox "off the table" = click on-> add row

    ... If checkBox "off the table" = clicked-> delete line

    }

    I'm not able to tell you what's wrong with your form, so I would need more information.

    So I guess that your need to add something like xfa.layout.relayout (); to your script.

  • XFA. Layout.y in the layout flowed

    Hello

    I used this line in version 7 of the creator in the layoutReady event:

    xfa.host.messageBox (xfa.layout.y (this, 'in'));

    This being a subform in a layout sank

    Now with the current version, I get an error on the different arguments.

    [I have several blocks of text separated by lines (wrapped with subforms). There is another line in the page footer. Now the client wants to omit the last line automatically when it comes too near the footer line.]

    Hope someone has already discovered a trick.

    ULI

    Hi Uli,

    I think the problem is using the messageBox to show the coordinate y. On the contrary if you use the JavaScript Console with the following script. Press control + J to open the console:

    console.println("y-coordinate is " + xfa.layout.y(this));
    

    I tested here, and it works. I think that the messgaeBox can be fountain for debugging.

    Niall

  • "BOLD" one part of the text of a messageBox

    How can I "BOLD" words (DO NOT meet EXPECTATIONS) the script below?

    xfa.host.messageBox ("FACT NOT meeting EXPECTATIONS - Performance level... »

    , 'PERFORMANCE FORM' , 3);

    Thank you

    Hello

    You're right, the links are down.

    I upped here once again

    https://Acrobat.com/#d=H3FSy2GQyI *-du1FKSirrw

  • difference of xfa

    Hello

    I'm changing some old forms that have been developed by someone else. and I'm scratching my head to understand the JavaScript in there

    I have a lot of forms to work on through the java script makes me nervous (I have no experience of programming).

    My question is, can someone explain to me the difference between and when they are used

    xfa.host.messageBox


    XFA. Layout


    XFA. Form

    I've seen these used frequently but have no idea of when use what.

    can someone explain to me briefly on this subject.

    Thanks in advance

    de1209

    Hello

    xfa.host.messageBox - simple messageBox as alert Javascript in web browsers

    xfa. Layout - represents the root of the layout model. Has some useful methods such as xfa.layout.relayout ();

    xfa. Form - represents the root of the form template. To access a field, you can use xfa.form.purchaseOrder.tax

    Also check the enclosed documents.

    BR,

    Paul Butenko

Maybe you are looking for