list editing fields via javascript hide

Hello

I designed a few forms in Acrobat that use layers to display different information based on the category of the person filling out the form. They choose their category on the page of the form, and then from their choice, the rest of the form is customized for this category.

The layers were built in Indesign and exported. The fields on the form are enabled and disabled through the action "show/hide a field" in the definition of button for each layer.

The problem is that there are dozens of fields to turn for each button and once I set the action, there is no way that I know to see a list of which fields are controlled by each button. If I change the button, I can access the list of actions, but I have to click on each one in the list independently to see what domain is assigned and the list itself is a small scrolling window and whenever you close an action it resets to the top of the scrolling window.

I'd like to be able to see a list of all the fields controlled by this button and the fact of this that every action, and ideally, to be able to add or change the actions performed without having to go through this interface. It of really a lot of time and impossible to know if I have skin or that he show the value configured incorrectly because it takes forever to find this job setting again.

I have not yet learned to javascript, and I think I must as soon as possible.

During this time - on a hunch, I made a copy of the pdf file, change the extension to .zip and opened in BB Edit. So, I see a lot of these command lines, that I know must be the javascript code to show or hide the fields. The field names are in brackets in the code below.

So, I see all these but how to edit these? Can I turn the latter into a script and edit them in Acrobat?

Y at - it a simple "shell" script that I can stick in and have the button run the script instead of the separate actions?

1820 0 obj

< < / 1822 next 0 R/PreserveRB false, S, SetOCGState, State [MARKET / STOP 1562 0 R 0 R 1565 0 0 R 1566 R/1563 1564 0 R 0 R 1567] > >

endobj

1822 0 obj

< < / next 1823 R/S/Hide/T (STAFF_CS_txm) 0 > >

endobj

1823 0 obj

< < / h 1824 fake/Next R / S / Hide / T (SUP_MGR_CS_txm) 0 > >

endobj

1824 0 obj

< < / 1825 next 0 R/S/Hide/T(STAFF_Comm#_txt) > >

endobj

1825 0 obj

< < / next 1826 R/S/Hide/T (STAFF_Comm_txm) 0 > >

endobj

1826 0 obj

< < / h 1827 fake/Next R / S / Hide / T(SUP_MGR_Comm#_txt) 0 > >

endobj

1827 0 obj

< < / h 1828 fake/Next R / S / Hide / T (MGR_Comm_txm) 0 > >

endobj

1828 0 obj

< < / 1829 next R/S/Hide/T (SUP_Comm_txm) 0 > >

endobj

1829 0 obj

< < / 1830 next 0 R/S/Hide/T(SUP_StaffMgmt#_txt) > >

endobj

and it will...

Any help would be GREATLY appreciated!

Is not JavaScript, but rather the show/hide field definition dictionaries. With the help of JavaScript will be the simplest method. I wouldn't change the document in this way as it is easy to damage it.

You can make it a LOT easier on yourself if you are using a HIERARCHICAL naming convention for your fields by giving each field in a particular group the same prefix, delimited by a "." character. For example:

Group1.name

Group1.address

Group2.name

Group2.address

This allows you to how / hide a whole group with a single JavaScript statement. For example:

Display all the fields in the Group1

getField("GROUP1").display = display.visible;

Hide all fields group2

getField("GROUP2").display = display.hidden;

Post again if you need help.

Tags: Acrobat

Similar Questions

  • PoPList LOV does not have another field via JavaScript

    I want to fill a field of a LOV poplist field value. I tried to write a javascript script, but when I clicked the poplist, poplist field gets filled but the other field has not. I put the following code in the HTML of the page header:
    <script language="JavaScript" 
    type="text/javascript">
    <!--
    function specialty_lookup_pick(){
      //  if P9_SPECIALTY_LOOKUP is not empty, then populate P9_SPECIALTY_FILTER with
      //  it
      if !(html_GetElement('P9_SPECIALTY_LOOKUP')==null ||html_GetElement('P9_SPECIALTY_LOOKUP')==' ') {
        html_GetElement('P9_SPECIALTY_FILTER').value =html_GetElement('P9_SPECIALTY_LOOKUP'); 
      }
    }
    //-->
    </script>
    On the lov poplist, I placed the following code in the HTML Form Element attributes of P9_SPECIALTY_LOOKUP (lov poplist):
    onChange="specialty_lookup_pick();"
    Login details:
    Workspace: RGWORK
    Application: Profile Mini-37838
    User: Tester
    Password: test123

    Follow the following steps:
    1. click on the button on the home screen search firms
    2. click on the architecture and engineering to the title of the research
    3. click on the poplist on the last line (before the go button)
    4. click on any value on the poplist

    Result:
    Poplist field is filled, but the specialty search s/b the padding (in javascript) but is not. Also, I noticed that session state is not defined for the poplist field.

    Can someone please help?

    Thank you
    Robert
    http://apexjscss.blogspot.com

    Your javascript is buggy and it would have been absurd in the part of the conditions of it. Now it's working. Start using firebug.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • To hide multiple items via javascript or actions in case of different variable values - how?

    Note: I'm still Captivate 8

    The Question has 2 parts:

    (1) is there a possibility to hide (or show) of the elements via javascript instead of shares advanced? I think it would be a much faster workflow. I think of something as

    If variable1 < = 100 screenx.elemeta.hide;

    If variable1 < = 90 screenx.elemetb.hide.

    If variable1 < = 80 screenx.elemetc.hide;

    If variable1 < = 70 screenx.elemetd.hide;

    (2) if it is not possible... OK, I use advanced actions. But there is the 2nd problem: it runs only the first part of it when exporting in HTML5.

    See photo. I try to hide - or no - hide the 9 elements in case of different values in a Variable. Lets say that the value is "7". In se9 is Laura if the value is less than or equal 9 to hide the element ausw_se_10. This method works. In se8 is asket if the value is less than or equal 8 in order to hide the element ausw_se_09 - what you see in the image. This and the following mask does not work. I'm doing something wrong or is this a bug? And is there a solution?

    sc_2015_10_16_erweiterte_aktionen.jpg

    Showing and hiding are a relatively easy control if you use HTML5:

    CP. Hide ("element_name");

    If you want to hide as much as you describe, you would need a very strict naming convention and use a loop to hide items.

  • Is there a method to add a field of barcode via Javascript?

    I think I did a reasonably diligent search and I can't find information on how a barcode field can be added to a PDF file via javascript.

    My Excel-based application generates a series of documents in PDF format (based on user feedback) and I would like to add a bar code field to some of them. I can't add the barcode manually field because PDF files don't exist as user-initiated.

    I considered adding the fields to my MS Word templates, but it seems that we did not support which is integrated.

    Back to my question... is there not a way to add a field of barcode in a PDF file programmatically?

    Thank you.

    It isn't documented, but you pouvez add a barcode field using the addField

    method. Simply specify the cFieldType parameter in the 'bar code'... The rest of

    the parameters are the same.

  • How to change the "TextVariable" via javascript

    Hello

    How can I change the value of a "Custom text Variable" via javascript in indesign CS5?

    I understand that there is a 'content' that is me allotted property, but I can't understand how to set or change.

    Here's the javascript code example for reference.

    var docRef = app.activeDocument;
    
    
    for ( var i = 0; i < docRef.textVariables.length; i++ ) {
    
    
        var textVariableItem = docRef.textVariables[i];
    
    
              // Check for the type
              if (textVariableItem.variableType === VariableTypes.CUSTOM_TEXT_TYPE){
    
    
                        var variableOption = textVariableItem.variableOptions;
      
                        // This will give me the text value of the variable
                        alert("Text Variable " + i + " \n " + textVariableItem.name + "\n" + variableOption.contents);
    
    
                        // But how do I set it? 
                        // The following does not seem to work 
                        variableOption.contents = "New custom text..."; 
              }
    }
    
    // Logic behind this script
    
    // theScript()
    // is a wrapper function to provide functional scope to the entire script
    // This function is invoked at the very bottom of the file
    
    // main();
    // the main function that gathers the initial parameters and launches the dialog box
    
    // function mainDialog(docRef, selectedItems, layers, inputs)
    // A function that creates a dialog box this function is passed as a parameter to a "factory method"
    // called function sfDialogFactory(dialog)
    // which is a general purpose utility for creating dialog boxes.
    
    // The mainDialog function has a callback function that responds to the "comtinue" button and after some validation
    // makes a call to a function called
    
    // function doAction(docRef, inputs, options)
    // This is where the main behvior of the script is suppose to be defined.
    // it is designed to be called AFTER the dialog box return and is the result of the callback inside mainDialog
    // The doAction function receives objects that are parameter holders for various inputs and options that come from the
    // dialog box presented to the user
    
    function theScript() {
    ///////////////////////////////////////////////////
    // BEGIN THE SCRIPT
    //=================================================
    
    ////////////////////////////////////////////////////////////////////////////////
    // SCRIPT MAIN PROCESS
    ////////////////////////////////////////////////////////////////////////////////
    // Main Process
    // The beginning of the script starts here
    // Add main logic routine to this function
    
    // Call Main Function to get the ball rolling
    var elementsData;
    var theDocument = app.activeDocument;
    var inputGroup;
    main();
    
    function main(){
    var theSelectedItems = theDocument.selection;
    var theLayers = theDocument.layers;
    
        var myDialog = sfDialogFactory(mainDialog(theDocument, theSelectedItems), theLayers);
        var result = myDialog.show();
        if (result == 1){
            newAction();
            alert("Done");
            }
        else{
            alert("Not Done");
            }
    }
    
    ////////////////////////////////////////////////////////////////////////////////
    // SCRIPT SUPPORTING FUNCTIONS
    ////////////////////////////////////////////////////////////////////////////////
    // Supporting Functions
    // Include functions that offer partial functionality
    // These functions are called and acted upon within the mainProcess function
    function newAction(){
    
            var formData = getControlValues(inputGroup);
            var inputs = {};
            var options = {};
           // alert("callback get form data");
          // Do something with formData values here
            var cLen = formData.controls.length;
            var formValues = '';
            for (var c = 0; c < cLen; c++ )
            {
                if (formData.controls[c].name === "inputECONumber") {
                    inputs.inputECONumber = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentName") {
                    inputs.inputDocumentName = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentNumber") {
                    inputs.inputDocumentNumber = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentRevision") {
                    inputs.inputDocumentRevision = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentType") {
                    inputs.inputDocumentType = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
            }//End FOR
        doAction(theDocument, inputs, options);
        }
    
    function mainDialog(docRef, selectedItems, layers, inputs) {
    
    // Main Dialog
    // alert("Main Dialog: " + docRef.name);
    
    if ( docRef === undefined ) {
      alert("Cannot Execute, please select a document.");
    }
    
      var currentData = getMetaData();
    
      var dialogObj = {};
    
      dialogObj.groups = []; // An array of dialog groups
      dialogObj.title = "Update Meta Data";
    
      var groupLabelInfo = {};
      groupLabelInfo.title = "Edit: " + docRef.name;
    
      // Add Elements using JSON shorthand syntax
      groupLabelInfo.elements = [
        {
            "name":"labelECONumber",
            "type":"statictext",
            "value":"Engineering Change Order (ECO) Number",
            "visible":true
        },
        {
            "name":"inputECONumber",
            "type":"edittext",
            "value": currentData.inputECONumber,
            "visible":true
        },
    
        {
            "name":"documentName",
            "type":"statictext",
            "value":"Document Name",
            "visible":true
        },
        {
            "name":"inputDocumentName",
            "type":"edittext",
            "value": currentData.inputDocumentName,
            "visible":true
        },
    
        {
            "name":"documentNumber",
            "type":"statictext",
            "value":"Document Number",
            "visible":true
        },
        {
            "name":"inputDocumentNumber",
            "type":"edittext",
            "value": currentData.inputDocumentNumber,
            "visible":true
        },
    
        {
            "name":"documentRevision",
            "type":"statictext",
            "value":"Revision",
            "visible":true
        },
        {
            "name":"inputDocumentRevision",
            "type":"dropdownlist",
            "value": currentData.listRevisions,
            "visible":true,
            "selection":currentData.selectionRevision,
        },
    
        {
            "name":"documentType",
            "type":"statictext",
            "value":"Label Type",
            "visible":true
        },
        {
            "name":"inputDocumentType",
            "type":"dropdownlist",
            "value": currentData.listDocumentTypes,
            "visible":true,
            "selection":currentData.selectionDocumentType,
        },
    
      ];
    
      // Add to groups to list
      dialogObj.groups.push(groupLabelInfo);
      return dialogObj;
    }
    
    function doAction(docRef, inputs, options) {
    
    alert("doAction " + docRef.name + " \n INPUTS: \n" + inputs.reflect.properties + "\n\n OPTIONS: \n" + options.reflect.properties);
    
    // Get the current contents
    
    var fooContents = app.activeDocument.textVariables.item ('Foo').variableOptions.contents;
    var barContents = app.activeDocument.textVariables.item ('Bar').variableOptions.contents;
    
    alert("GET textVariable contents \n Foo: \n" + fooContents + "\n\n Bar: \n" + barContents);
    
    // Set/Update the contents
    // Why does this not seem to work?
    
    alert("SET textVariable contents \n Foo: \n" + inputs.inputDocumentName + "\n\n Bar: \n" + inputs.inputDocumentType);
    
    app.activeDocument.textVariables.item ('Foo').variableOptions.contents = inputs.inputDocumentName;
    app.activeDocument.textVariables.item ('Bar').variableOptions.contents = inputs.inputDocumentType;
    
    // Script does not seem to reach this point. Why?
    alert("END of doAction");
    }
    
    // A Factory function for creating dialog boxes
    
    function sfDialogFactory(dialog) {
    
        // A factory method for creating dialog screens
    
        // Dialog Window
        var d = new Window("dialog", dialog.title);
    
        // alert("Number of Inputs" + dialog.inputs.length);
        // alert("Number of Options" + dialog.options.length);
    
        var i; // counter
        var len; // length of array elements
    
        // Generate Groups
        if (dialog.groups.length > 0) {
    
            len = dialog.groups.length;
            for (i = 0; i < len; i++ )
            {
                var currentGroup = dialog.groups[i];
                inputGroup = d.add ("panel", undefined, currentGroup.title);
                    inputGroup.alignChildren = ["fill","fill"];
    
                if (currentGroup.elements.length > 0) {
                    // Add Elements
                    var ii;
                    var elemLen = currentGroup.elements.length;
                    for (ii = 0; ii < elemLen; ii++ )
                    {
                        var currentElement = currentGroup.elements[ii];
    
                        var el = inputGroup.add(currentElement.type, undefined, currentElement.value);
    
                        // Additional properties added for future reflection
                        el.elName = currentElement.name;
                        el.elIndex = ii;
    
                        switch(currentElement.type)
                        {
                            case "statictext":
                                el.visible = currentElement.visible;
                            break;
                            case "edittext":
                                el.visible = currentElement.visible;
                            break;
                            case "dropdownlist":
                                el.visible = currentElement.visible;
                                el.selection = currentElement.selection;
                                el.onChange = currentElement.onChange;
                            break;
                            case "checkbox":
                                el.visible = currentElement.visible;
                                el.value = currentElement.value;
                            break;
                            default:
                            throw new Error('Unknown Dialog Element Type [' + currentElement.type + ']');
                        }
    
                    }
                }
            }
        }
    
      // Buttons Group
      var buttonGroup = d.add("group");
      var bOK = buttonGroup.add("button", undefined, "Continue", {name: "ok"});
      var bCANCEL = buttonGroup.add("button", undefined, "Cancel", {name: "cancel"});
    
      return d;
    }
    function getControlValues(set) {
        elementsData = {};
        elementsData.controls = [];
        // TO DO Add more types
    
        var giLen = set.children.length;
        for (var gi = 0; gi < giLen; gi++ )
        {
            var child = set.children[gi];
            // alert(objReflection(child, "none", false));
            // alert(child.type);
            var control = {};
                control.name = child.elName;
                control.index = child.elIndex;
                control.type = child.type;
                control.visible = child.visible;
            switch(child.type)
            {
                case "statictext":
                    control.value = child.text;
                break;
                case "edittext":
                    control.value = child.text;
                break;
                case "dropdownlist":
                    control.value = child.selection.text;
                break;
                case "checkbox":
                    control.value = child.value;
                break;
                default:
                throw new Error('Unknown Dialog Element Type');
            }
            elementsData.controls.push(control);
            // alert(objReflection(control, "none", false));
        }
        return elementsData;
    }
    function getMetaData() {
    // Return a data structure that contains meta data from the document.
    
        var dataObject = {};
    
         // Default arrays
         dataObject.listRevisions = generateRangeOfNumbers ("r", 1, 100);
         dataObject.listDesignComps = generateRangeOfNumbers ("Comp_", 1, 100);
         dataObject.listDocumentTypes = [
                         "Datasheet",
                         "Manual",
                         "Tech Guide",
                         "Other"
                     ];
    
         // Set Sensible Default Values for the UI Form
         if (!dataObject.inputECONumber) {
             dataObject.inputECONumber = "###ECO###";
         }
    
         if (!dataObject.inputDocumentName) {
             dataObject.inputDocumentName = "Document Name";
         }
    
         if (!dataObject.inputDocumentNumber) {
             dataObject.inputDocumentNumber = "048-xxx-30";
         }
    
         if (!dataObject.inputDocumentRevision) {
             dataObject.inputDocumentRevision = "r01";
         }
    
         if (!dataObject.inputDocumentType) {
             dataObject.inputDocumentType = "Datasheet";
         }
    
         return dataObject;
    
    }
    
    function generateRangeOfNumbers (prefix, start, end) {
        // This function generates an array of sequential numbers within a range
        // prefix = string to append to beginning of each element
        // start = the beginning of the range
        // end = the end of the range
        // length = overall number of cycles to loop through, start and end must fall within this value
    
        var output = [];
    
        for ( var i = start; i <= end; i++ )
        {
            if (i < 10) {
                // Add a leading zero
                output.push(prefix + "0" + i);
            }
            else {
                output.push(prefix + i);
            }
        }
    
        return output;
    }
    
    //=================================================
    // END THE SCRIPT
    ///////////////////////////////////////////////////
    }
    
    theScript();
    

    I modified your code shortly. He works for me here. Check it out...

    Thank you

    Green4ever

  • Get the text in the Edit field

    Hello

    In my Application, I add a check box and a label field and a field change a grid field Manager. Then this network domain manager, I add several times in Vertical field Manager. So it's looking like list of items. Now, when I checked the box five, trying to get the text of the corresponding edit field.

    This is the code for the domain network manager:

    int c[] = {screenWidth/6, (screenWidth)/3, (screenWidth)/2};
            gm = new GridFieldManager(c, Manager.VERTICAL_SCROLL);
            Logger.out("Grocery", "Here it is coming"+i);
            cbfChecked = new CustomCheckBoxField();
            cbfChecked.setChangeListener(new FieldChangeListener()
            {
                public void fieldChanged(Field field, int context)
                {
                    if(checked[i] == false)
                    {
                        checked[i] = true;
                    }
                    else if(checked[i] ==  true)
                    {
                        checked[i] = false;
                        Logger.out("Grocery", "It is UnChecked" +checked[i]);
                    }
                }
            });
            gm.add(cbfChecked);
            Logger.out("Grocery", "Adding first Label Field");
            LabelFieldCustom lfFrom = new LabelFieldCustom((String) m_vtrItems.elementAt(i),Color.BROWN,FONT_FAMILY_0_SF_AS_16,Field.FIELD_LEFT);
            gm.add(lfFrom);
            Logger.out("Grocery", "Adding second Label Field");
            efcAmount = new EditFieldCustom(Bitmap.getBitmapResource("dob_text_box.png"), 25);
            efcAmount.setMargin(new XYEdges(30, 0, 0, 0));
            gm.add(efcAmount);
            return gm;
    

    Here I add the grid domain manager several times:

    for (int i = 0;i < m_vtrItems.size();i++)
            {
    
                vfm.add(getRow(i));
                vfm.add(new SeparatorField(SeparatorField.NON_FOCUSABLE));
    
            }
    

    Here is the snapshot of my screen:

    Please help me.

    You can access the field by index (prone to errors if).
    or you could save your fields in a data structure, such as a hash table, with the checkboxfield as key to the editfield as value.
    or...

  • Text of tip/guest/space reserved on a digital editing field / password

    Hi all

    I am introducing the rapids/tips for the edit fields text in my application. I capture the key in the api keyChar() and therefore

    • show the cue text if the field is empty
    • hide the cue already displayed text when the first character is entered

    According to me, one way to do this is to paint your index directly on the EditField.  This way, the EditField never sees.  And you can paint it in a light color to indicate clearly what is not actually entered.

    Here is an example of code, note that I cut/pasted it from a working application, but changed a few things that I think are not - but it could have messed up it completely...

    private BasicEditField _searchField = new BasicEditField ("", "") {}
    String emptyString = "search by input characters;
    Protected Sub paintBackground (Graphics g) {}
    g.setBackgroundColor (0x00FFFFFF);
    g.Clear ();
    }
    protected void paint (Graphics g) {}
    oldColor int = g.getColor ();
    try {}
    g.setColor (0x00000000);
    Test string = super.getText ();
    If (test == null | test.length ())< 1="" )="">
    g.setColor (0 x 00808080);
    g.drawText (emptyString, 0, 0);
    }
    Super.Paint (g);
    } {Finally
    g.setColor (oldColor);
    }
    }
    };

  • How to set null article Page in Session Via JavaScript

    Request Express 4.2.6.00.03

    We set a value in a control SELECTION, 'P5_DATASET_NAME ', in the session with a dynamic Action on the change of this control.

    We do this with the following JavaScript code snippet:

    Apex. Server.Process ("dummy"

    , {pageItems: '#P5_DATASET_NAME'}

    , {dataType: "text"}

    Async: false,

    complete: function (ajaxResponse)

    {

    var ignoredReturn = ajaxResponse.responseText;

    }

    });

    It works perfectly, as long as the user selects a value not zero in the drop-down list SELECT down. In other words, we can make any selection (other than NULL), pop up the session in the developer toolbar and immediately see the new value it. In addition, if we then refresh an interactive report on the page that uses the value of this element in the SELECT source, he correctly extraction based on the new value.

    * HOWEVER * if the user selects the NULL option (only if they choose this option), value in the session remains unchanged and continues to be set to the previous value. The $v function correctly reports the null value. If the is updated interactive report it is based on the previous value.

    So, the question is, what is special about NULL? How can I position "unplugged", the value of a session (or null) article page via JavaScript?

    Thank you

    -Joe

    Joe Upshaw wrote:

    Request Express 4.2.6.00.03

    We set a value in a SELECTION control, "P5_DATASET_NAME", at the session with dynamic Action on the change of this control.

    We do this with the following JavaScript code snippet:

    Apex. Server.Process ("dummy"

    , {pageItems: '#P5_DATASET_NAME'}

    , {dataType: "text"}

    Async: false,

    complete: function (ajaxResponse)

    {

    var ignoredReturn = ajaxResponse.responseText;

    }

    });

    It works perfectly, as long as the user selects a value not zero in the drop-down list SELECT down. In other words, we can make any selection (other than NULL), pop up the session in the developer toolbar and immediately see the new value it. In addition, if we then refresh an interactive report on the page that uses the value of this element in the SELECT source, he correctly extraction based on the new value.

    * HOWEVER * if the user selects the NULL option (only if they choose this option), value in the session remains unchanged and continues to be set to the previous value. The $v function correctly reports the null value. If the interactive report is updated it is based on the previous value.

    So, the question is, what is special about NULL? How can I position "unplugged", the value of a session (or null) article page via JavaScript?

    Another question is: why are you going to this length instead of just using the source attribute Page to go on IR region, which will be automatically put in the session state until the IR is updated?

  • How can I reproduce a field in JavaScript, including its action script?

    Hello

    I saw ways to reproduce effectively the value of a field in JavaScript.  The following code is from a JavaScript for Acrobat API document:

    f = this.getField ("myField");

    for (var I in f) {}

    try {}

    If (typeof f [i]! = 'function') / / do not list the field methods

    Console.println (I + ': ' + f [i])

    } catch (e) {} / / an exception occurs when we get a property that

    } / / does not apply to this type of field.

    With the exception of all the scripts that could be associated with the field, I think that the code actually gives the variable "f" a copy of the field "MyField" - with all of its properties and values.  At this point how would I be able to get a copy of all the scripts in action the field?  I want to go to a certain extent, where I could possibly add them to the field 'f'  Is it possible to do this?

    Thank you for your time and consideration,

    Mike

    PS: I use Acrobat Pro XI for the development.

    No, you can not what actions/scripts are attached to field (events) with JavaScript triggers.

  • Missing fonts in InDesign via javascript

    Hello

    I want to list all missing fonts in the Indesign file via javascript

    I was a little confused with no. 2 and no. 5

    1 FontStatus.installed1718831470

    2 FontStatus.notAvailable1718832705

    3 FontStatus.fauxed1718830689

    4 FontStatus.substituted1718834037

    5 FontStatus.unknown1433299822

    that one must use or should I use these two?

    Please help me

    Thanks in advance

    Mahesh J

    Hello Manu,

    You can use only no. 2 [FontStatus.notAvailable 1718832705].

    Because points 5 is a rare case. If the application unable to identify the status of the police then only he presented as 'UNKNOWN '.

    For a list of missing fonts, you can use only the 2 bridge.

    Kind regards

    River. P

  • Non editable field change to highlight the problem

    Hi all

    I have an edit non editable field in my screen. In order to make the difference between editable and non editable field, I put the bottom of the field cannot be changed to light gray as in the code below:

       Border nonEditableBorder=BorderFactory.createRoundedBorder(new XYEdges(5, 5, 5, 5),Color.LIGHTGRAY,Border.STYLE_FILLED|Border.STYLE_TRANSPARENT);
    EditField textField=new EditField(EditField.NO_NEWLINE|EditField.FOCUSABLE|DrawStyle.RIGHT);
    textField.setBorder(nonEditableBorder);
    

    Now the field cannot be changed when I scroll the wheel to the right or left the text gets highlighted in white as shown in the image below:

    I don't want the text to highlight. Can anyone help me please with this. Thanks in advance.

    Kind regards

    S.A.Norton Stanley

    Hello

    Thank you. Overridding method drawFocus() and nothing doing, emphasis has been disabled on the fields and the white highlight was not. But once I reached the first or the last field of the white selection screen gets drawn again.  But the border I also assign the background of the field edit as shown below, and this solved my problem.

    Background bgNonEditable = BackgroundFactory.createSolidBackground(Color.LIGHTGRAY);
    textField.setBackground(bgNonEditable);
    
  • Access a list of QObjects using Javascript of QML?

    I want to access a list of QObjects of Javascript so that they are accessible for example like this:

    var items = mycontextproperty.getItems()
    for(i =0; i< items.length; i++){
       items[i].name;
    }
    

    I expect fair access properties read-only.

    In C++, I have a what method defined like this

    Q_INVOKABLE QList getItems()

    or like this

    Q_INVOKABLE QVariantList getItems()

    and then I manually add QObject * to QVariantList

    Neither one seems to work. Does anyone know how to expose a simple list in C++ QML?

    I think that you can implement to get the stitch data of C++.

    var size = mycontextproperty.getItemSize()
    for(i =0; i< size; i++){
       //name = mycontextproperty.getItemName(i);    var data = mycontextproperty.getItem(i); //Should have a try with QVariantMap
    }
    
  • Is not scrolling screen when the virtual keyboard is opened by clicking an edit field

    Hello

    I have searched and tried many things, but not got success.

    There are three managers of verticalfield in my screen.

    1.)

    vfmMain

    = new VerticalFieldManager(Manager.USE_ALL_WIDTH |) Manager.USE_ALL_HEIGHT | Manager.NO_VERTICAL_SCROLL) {}

    protected voidpaint (Graphics grphcs) {}

    if (imgBG! = null) {

    grphcs.drawBitmap (0, 0,

    imgBG.getWidth (), imgBG.getHeight (), imgBG, 0, 0);

    }

    Super.paint (grphcs);

    }

    protected void sublayout (int maxWidth, maxHeight int) {}

    maxWidth = UIConstants.

    SCREEN_WIDTH;

    maxHeight = UIConstants.

    SCREEN_HEIGHT;

    Super.sublayout (maxWidth, maxHeight);

    Super.setExtent (maxWidth, maxHeight);

    }

    };

    2.)

    vfmFieldNS

    = new VerticalFieldManager(Manager.USE_ALL_WIDTH |) Manager.USE_ALL_HEIGHT | NO_VERTICAL_SCROLL) {}

    protected voidpaint (Graphics grphcs) {}

    if (imgBGCoverInternetHome! = null) {

    grphcs.drawBitmap ((UIConstants.

    SCREEN_WIDTH - imgBGCoverInternetHome.getWidth () / 2, 0, imgBGCoverInternetHome.getWidth (), imgBGCoverInternetHome.getHeight (), imgBGCoverInternetHome, 0, 0);

    }

    Super.paint (grphcs);

    }

    protected void sublayout (int maxWidth, maxHeight int) {}

    maxWidth = UIConstants.

    SCREEN_WIDTH;

    maxHeight =

    imgBGCoverInternetHome.getHeight () / *-UIConstants.SCREEN_HEIGHT (UIConstants.LABEL_HEIGHT + UIConstants.FOOTER_MENU_HEIGHT) * /;

    Super.sublayout (maxWidth, maxHeight);

    Super.setExtent (maxWidth, maxHeight);

    }

    };

    3)

    vfmScroll

    = new VerticalFieldManager(USE_ALL_WIDTH |) USE_ALL_HEIGHT | VERTICAL_SCROLL) {}

    protected void sublayout (int maxWidth, maxHeight int) {}

    maxWidth = UIConstants.

    SCREEN_WIDTH;

    maxHeight =

    imgBGCoverInternetHome.getHeight () - imgButtonFocusBig.getHeight (/2/*UIConstants.SCREEN_HEIGHT - (UIConstants.LABEL_HEIGHT + (UIConstants.FOOTER_MENU_HEIGHT + VERTICAL_GAP))) * /;

    Super.sublayout (maxWidth, maxHeight);

    Super.setExtent (maxWidth, maxHeight);

    }

    };

    I'm addidng all fields in the Manager of scrolling that is vfmScroll.

    By clicking on the edit field, virtual keyboard opens on the screen, change the field leathers and screen does not scroll.

    Help, please.

    Thanks in advance.

    Thanks for the reply of Peter. Instead of UIConstants.SCREEN_HEIGHT, now I use Display.getHeight () - headerHeight-footerHeight. Given that Display.getHeight () is calculated accordingly when the virtual keyboard is open, so his works well for me.

  • How to paste text in ANY editable field (e-mail, sms, browser, contacts address bar / any other application)

    Hello

    Can anyone help me please with the following questions:

    1. once I have add a menu item to help

    ApplicationMenuItemRepository.getInstance().addMenuItem(ApplicationMenuItemRepository.MENUITEM_SYSTEM, myMenuItem);
    

    I am able to access an instance of net.rim.blackberry.api.mail.Message (when I'm in the e-mail editing mode) and put the content in the subject / body of the email, but it was mostly a proof of concept for me.

    What I really want to be able to do, it's automatically access the instance of any editable field in any (RIM / part 3) app that the user cursor is now. When the focus is on something that is not editable, then my menu item should not appear in the menu.

    In addition, it is important for me to know exactly where the cursor is. For example if the cursor is in the middle of the text, then I want that my extraordinary paste paste of stuff there. The same for the selected text - it needs to be replaced.

    Basically I want my menu Paste Special feature works exactly like 'Stick', unless I want to offer which should be pasted.

    2. Apart from curiosity, what are we supposed to go back to the

    public Object run(Object context)
    

    method? For now, I'm doing my treatment based on the type of control context and make the treatment on it and everything just return null (which works well), but I don't know I'm on some features.

    Never done this, but looking at the API and remembering what simon_hain said when asked a similar question, I think it goes like:

    You can get help from the active screen

    UiApplication.getUiApplication () .getActiveScreen ();

    You can get the Menu for a screen to help

    . getMenu();

    You can browse the menu for help

    . getItem()

    for

    . getSize()

    entries.

    I think that 'toString' will give you the message, then

    . Run()

    to run it.

  • Edit field change notify pop up

    Hello

    How to avoid the pop-up screen which appears when editing field does not appear in the screen

    How to avoid this pop up screen?

    Thanku

    Add this to your screen:

    /*
    * Override to ignore the save/discard/Cancel dialog box
    */
    public boolean onSavePrompt() {}
    Returns true;
    }

    Not wanting to be rude, but I recommend looking in the forum before asking the question.  This question has been asked and answered several times in the past and I suspect you would have found if you had looked.  Ok?

Maybe you are looking for