How to write the Java script to reference the 1st page 2nd page text field?

Hello

I'm developing an interactive form of VISITOR info with webdynpro ABAP, his as well as 2 pages. Their hierarchy is,

VISITOR_form
    |
    |
    |------Page_1
    |            |
    |            |
    |            |------Text_Field_A_1
    |            |
    |            |------Text_Field_A_2
    |
    |------Page_2
                 |
                 |
                 |------Text_Field_B_1
                 |
                 |------Text_Field_B_2

Now, I chose the 'Text_Field_B_1' of page_2 and write the script Java, my requirement is; If Page_1's ' Text_Field_A_2' is set to 'Value_ABCD', THEN the 'Text_Field_B_1' of page_2 should be 'readOnly '. Pls let me know WHT is the Java script for this requirement?

If (xfa.event.newText == "ABCD)."
{

VISITOR_form. Page_2.Text_FieldB_1.access = "readOnly";

}

Put the script on the Text_FieldA_2 change event

Tags: Adobe LiveCycle

Similar Questions

  • Definition of child page value to the Parent page text field

    Apex 4.1.

    I have a form of the apex. When the user clicks a button on this page, it redirects to another page and the user can select a value from a list of values (Group of Radio buttons) and when the user click on the "Done" button on the second page, I'm again redirect to the front page and what needs to happen is the selected value in the second page should be set to a text field in the first page (parent). How can I do this, I tried the following,.

    (1) on the second page (list of values), I added a process to get the selected value and set it to the field of the 1st page (Page Item)
    (2) I created a branch to redirect to the first page when the user hit "Done" button and in the branch options, I gave the order of the day of the 1st page (at what value need to be defined) and the value selected in the second page.
    (3) in both methods, after redirection back to (1) parent Page, I checked the value of this particular text field page element, and it had the value selected in page 2. but still, it was did not update the user interface.

    Really grateful if someone can help on this.

    Apex-EPA,

    Some things could happen...

    1. your text field still has its source type by replacing the value and is overwhelming everything you set the value on.
    2. on your second page, you do not use the branch that you think that you use to return to the first page.
    3. your branch to the first page is clear the cache on the first page.

    Here is an example of this work: http://apex.oracle.com/pls/apex/f?p=43401:35:0

    See you soon,.
    Janet Tyson

  • How I set the value of a dynamic text field row

    I have a repeated line form that contains a button and several text fields.  There is a text field (input field) above with some information I want to place in the table and several buttons that I want to read the value of and defined on the table.  Excuse me there are several questions I have and I use pseudocode to describe.

    Top shape resembles

    InputField

    | ButtonX1 | ButtonY1 | DescriptionX1 (read the text only field)

    ...

    | ButtonXn | ButtonY1 | DescriptionXn

    OutputRow looks like

    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |

    So, I want to do

    ButtonX1.click

    {

    OutputTable.OutputRow.addInstance (true) //this works - everything I have questions on

    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue

    /*

    Question 1

    How should I address the location of each table to set a value

    Question 2

    How can I get the value of the description field in the same row as button and table

    I would like to say something to the effect of the OutputTable.OutputRow [?]. OutputField1.rawValue = this.parent.DescriptionX

    */

    OutputTable.OutputRow.OutputField2 = InputField.rawValue

    /*

    Same question as above - how can I specify a dynamic line - it's the syntax appropriate for obtaining the value of the input field?

    */

    OutputTable.OutputRow.OutputField3 is this. ButtonLabel

    /*

    Question 3

    How can I get the value of the label of the button to set the field

    There should be a lot of these buttons and buttons will be added - I'd rather set the value based on the label of the button to facilitate value - not requiring only not to change the code

    */

    Issue 4--unrelated to those at the top.

    Is it possible to build the first table

    | ButtonX | ButtonY | Description |

    from a XML file.  I've seen examples showing how to build if it's just data, but XML can be pushed into a form with the code to perform the above actions?

    Glad you figured it out... nothing wrong with doing it this way.

    Normally XML contains data and no default legends these xml files are bouond to the rawValue property. You can enable the dynamic linking and other properties of the object will be bindable (they appear as links) in the user interface. If you click on the link to legend an Assistant appears allowing you to bind the node in the XML file.

    Paul

  • On the Master Page text field

    I have a couple of text fields on the main Page of this repetition on the other pages. I want that the user can enter information on the first page and do not have access to the other pages. Is there a way to get there?

    Thank you

    PARRE

    Hello

    Yes, this can be done with a small script in FormCalc in the layout event: loan of a text field.

    if (this.parent.index gt 0) then
              $.access = "readOnly"
    endif
    
  • How to create the new page in the master page and make reference to the reference text framework previous page id?

    I have problem to apply/create an element of the master page and how to run the previos page text block to create the page text

    InterfacePtr<IPageSetupPrefs> iPageSetupPrefs (,static_cast<IPageSetupPrefs * > (:QueryPreferences() IID_IPAGEPREFERENCES, docRef)));

    if (iPageSetupPrefs is nil) {

    Assert (iPageSetupPrefs);

      break

    }

    InterfacePtr<ICommand> iNewPageCmd (CmdUtils:kNewPageCmdBossCreateCommand());

    if (iNewPageCmd is nil) {

    Assert (iNewPageCmd);

      break

    }

    InterfacePtr<IApplyMasterCmdData> iApplyMasterCmdData (iNewPageCmd, IID_IAPPLYMASTERCMDDATA );

    if (iApplyMasterCmdData is nil) {

    Assert (iPageCmdData);

      break

    }

    InterfacePtr<IPageCmdData> iPageCmdData (iNewPageCmd,UseDefaultIID());

    if (iPageCmdData is nil) {

    Assert (iPageCmdData);

      break

    }

    Int32 numPagesToInsert = 1;

    PMRect pageSizeRect = iPageSetupPrefs->GetPageSizePref();

    Int32 pos = iPageCmdData->GetNewPageInsertPosition();

    ISpreadGeometry InterfacePtr<IGeometry> (spreadList->QueryNthSpread(0));

    if (iSpreadGeometry is nil) {

    Assert (iSpreadGeometry);

      break

    }

    spreadUIDRef =:GetUIDRef(iSpreadGeometry);

    PMRect dfltPMRectPageSize = iPageSetupPrefs->GetPageSizePref();

    PMReal pageWidth is dfltPMRectPageSize. Right () - dfltPMRectPageSize. Left ();

    PMReal pageHeight is dfltPMRectPageSize. Bottom () - dfltPMRectPageSize. Back to top ();

    PMRect usrDefPMRectPageSize (0, 0, pageWidth, pageHeight);

    K2Vector< PMRect> pageBoundingBoxes;

    for ( int32 i = 0; i < numPagesToInsert; ++ i) {

    pageBoundingBoxes. push_back (usrDefPMRectPageSize);

    }

    iPageCmdData->SetNewPageCmdData(spreadUIDRef, numPagesToInsert, pos +1, & pageBoundingBoxes, nil);

    / / CreateSpreadFromSpread (docRef, spreadUIDRef);

    InterfacePtr<IBoolData> iBoolData (iNewPageCmd,UseDefaultIID());

    if (iBoolData is nil) {

    Assert (iBoolData);

      break

    }

    bool16 allowShuffle;

    if (this->GetShufflePref(allowShuffle, docRef) iskFailure) {

      break

    }

    iBoolData->Set(allowShuffle);

    CmdUtils:ProcessCommand(iNewPageCmd);

    Above code, able to create a page but the problem in applied master page?

    Using document Pages face?

    I think that your posToInsertAt for IPageCmdData::Set is incorrect.

    If the doc does not have facing Pages, posToInsertAt = 1;

    If doc is facing Pages and page insertion is the left-hand Page, posToInsertAt = 2;

    If doc is facing Pages and insert page is the right Page, posToInsertAt = 1;

    posToInsertAt = spread-> GetNumPages();

    newDocCmd and newDocCmdData are not used, you can delete these.

  • How to write the script in FDMEE below.

    How to write the script in FDMEE below.

    Script below is the FDM Script.How write in FDMEE.

    If (varValues (14) '113101' =) OR (varValues (14) '113201' =) OR (varValues (14) '113301' =) OR (varValues (14) = "252111") OR (varValues (14) '156101' =) then

    Result = "21_asd."

    Please help me on this issue.

    Kind regards

    Satheesh, S

    If you want to determine the id of the target account your opening assignment statement must be:

    Account = fdmRow.getString ("ACCOUNTX")

    As if - elif-instructions else keep lowercase stream operators. If you continue a command on multiple lines, then place parentheses is

    If (account == "113101") or (account == "113201") or (account == "113301") or (account == "113401") or (account == "113501") or (account == "113601") or (account == "215101") or (account == "215201") or (account == "215301") or (account == "215401") or (account == "215501") or (account == "215601") or (account == "252111") or (account == "156101"):

    fdmResult = "21_ADNIP".

    should be (also get rid of the unnecessary parentheses)

    If (account is "113101" account is "113201" or account is '113301' account is "113401" or account is "113501" or account is "113601" or account is "215101" or account is "215201" or account is "215301" or account is "215401" or account is "215501" or account is "215601" or account is "252111" or account is "156101"):

    fdmResult = "21_ADNIP".

  • How to write the validation at the point of java sript should not allow more than 20 ch

    Hello

    I need to write validation java script for an item, that it should not allow more than 20 characters.


    Thank you
    Nr

    If this answers your question, enter your question as answered (so everyone knows that he's answered) and give points wherever you want...

    Thank you

    Tony Miller
    Webster, TX

  • Open XML, how to write the path

    Hello

    I'm new to the Blackberry development and I hope you can help me with my problem. I try to work with an XML file, and so far, all that does very well as long I had the xml file, I work on, in the folder of my java application and deyployed using the desktop software. Now, I tried to put the file somewhere else on the Blackberry and I don't know how wirte the path to the source code. I tried the following, but it seems to be bad:

    private static String _xmlFileName = "file:///store/home/user/documents/test.xml";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = factory.newDocumentBuilder();
                InputStream inputStream = getClass().getResourceAsStream( _xmlFileName );
                Document document = builder.parse( inputStream );
    

    I hope you can give me a hint, how I write the correct path?

    Thank you very much!

    Best regards, jtr87

    PS: Sorry for my bad English, but I did not use it very often.

    You need to do something like that to get your InputStream:

    /** * @return an open InputStream for a file, or null if file does not * exist. * @throws IOException if there is an error opening the file */InputStream getInputStream(String name) throws IOException {
        FileConnection fc = null;
        try {
            fc = (FileConnection) Connector.open(name, Connector.READ);
            if (fc.exists()) {
                return fc.openInputStream();
            }
        } finally {
            if (fc != null) {
                try {
                    fc.close();
                } catch (Exception ignored) {
                }
            }
        }
        return null;
    }
    

    Notice that you must close the FileConnection at some point, regardless of if the call to openInputStream worked.

  • How to write the even-odd fill feature?

    How to write the even-odd fill feature?

    Maybe like this:

    app.executeMenuCommand ('* ');

    01.jpg

    There is a command in the PathItem object named evenodd. I think that if you change the property of evenodd and get a member of a composite path path, you can achieve a desired result.

  • How to write the query

    Hello

    How to write the sql query

    I have three type of table as

    1 table emp

    EMP_ID FIRST_NAME DEPT_ID

    ---------- -------------------- ----------

    1 kumar 10

    2 sam                          20

    3 30 damu

    2 table dept

    EMP_ID SALE_ID DEPT_ID

    ---------- ---------- ----------

    1 101 10

    2 102 20

    3 103 30

    3. table sale

    EMP_ID SALE_ID SALE_AMT

    ---------- ---------- ----------

    1 101 7

    2 102 8

    3 103 9

    I want the result as

    EMP_ID DEPT_ID SALE_AMT

    -------      ---------   -            --------

    1                10                  7

    Thank you

    Are you looking for this?

    SELECT T1. EMP_ID,

    T1. DEPT_ID,

    W3M SALE_AMT

    FROM EMP T1,

    SALE T3

    WHERE T1. EMP_ID = T3. EMP_ID;

    OUTPUT:

    EMP_ID DEPT_ID SALE_AMT

    ------- ---------- ----------

    1         10          7

    2         20          8

    3         30          9

    If this is not the case, after the actual output, you need. Because that gives you the amount of sales deptwise

  • How to write the 'C' alpabelt within a circle of author?

    Hello

    How to write the symbol of copyright on first Pro CC (ie the alpabelt 'C' inside a circle) ?

    Thank you

    On a Mac, Option + G.

    MtD

  • How to write the query option in expdp

    Hi Please someone help me how to write the query option in expdp... .in expdp using the query option...

    where AM columnname between 5 May 12 02:57:00.000' and ' 02:59:59.999 6 May 12: ';


    Please do what is necessary...

    Pavan Kumar says:
    QUERY = (columnname scott.test: "where between 5 May 12 02:57:00.000 h ' and ' 6 May 12 AM 02:59:59.999'")

    Who will fail in databases, because you assume nls_date_format. How it is difficult to put to_date() surround channels? Rather than play with quotation marks, using one parfile thusly.

    query=table_owner.table_1:"where business_date between to_date('20120505025700 am','yyyymmddhhmiss am') and to_date('20120505025959 am','yyyymmddhhmiss am')"
    query=table_owner.table_2:"where business_date between to_date('20120505025700 am','yyyymmddhhmiss am') and to_date('20120505025959 am','yyyymmddhhmiss am')"
    query=table_owner.table_3:"where business_date between to_date('20120505025700 am','yyyymmddhhmiss am') and to_date('20120505025959 am','yyyymmddhhmiss am')"
    

    You do not have to have all the clauses in a single line, as they are side by side parfile, which would be enough. For this reason parfile is better than the command line in order to avoid all the back-citing dance.

  • How to write the select query for it

    Hello

    I had an html form and the area I drop down and he needs to select several values in the drop-down box. When I select multiple values then I have to write the query to SQL select statement.

    When I try to write the select statement and trying to run I get the error message.

    Select * from Table

    where emo_no = '1,2,3 '.

    That's how I write the query please suggest me how to write the query to select several values in the drop-down box.

    Thank you

    Use the keyword sql 'in '.  If you don't know how, I've heard good things about the book Teach Yourself SQL in 10 Minutes by Ben Forta.

  • How to write the text file in Shockwave?

    Someone knows how to write the text file in Shockwave on the disc of the user?

    Thanks in advance.

    These Xtras can cause a lot of havoc when used with the intent to hurt.
    What you can do is to write with setpref and store a list of backups and the
    registers itself separately. Next, you need to build your own save/open
    dialog box for the user:
    * Choose a previously saved file to load or replace
    to create a user type the name of a new file to be saved.

    The only thing that remains is that the user can't decide where files
    are saved.

    Manno

    SiuLinda wrote:
    > Thanks a lot for your answer.
    > Yes, cookies is good, but I have to write a program to save the text file in
    > When the user wants, the user can open these files later if they like as, using
    > Filextra and Fileio, but I found that all these Xtra extensions seem to be not supported by
    > shockwave.
    >

    --
    ----------
    Manno Bult
    [email protected]

  • How to calculate the sum of two digital form fields based on the selection of the checkbox.

    I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B

    _ Field - 2

    _ Field - A 4

    [check] _ _ field - 6 C

    [disabled] _ _ field - 2 C

    Thank you

    The custom field C calculation script could be:

    (function () {
    
        // Get the values of the text fields, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        // Set this field's value based on the state of the check box named "CB"
        if (getField("CB").value !== "Off") {
            event.value = v1 + v2;
        } else {
            event.value = v1;
        }
    
    })();
    

    Replace 'A', 'B', and 'CB' with the real names of the fields.

  • Script to collect the "Master page-text-content of the framework" details

    Hello

    The collection "Masterpage - TextFrame - content" Indesign file details.

    If the spread of the master page text frame, I need to retrieve this text frame content in separate folder. If it possible by Indesign script?

    Thank you

    hasvi

    Hi Hasvi,

    I hope this helps you!

    var doc = app.activeDocument;

    var master = doc.masterSpreads;

    var content = "";

    for (var i = 0; i)<>

    {

    for (var j = 0; j)<>

    {

    If (master [i] .parentPage .textFrames [j]! = null) {}

    content += [i] master .silence .textFrames [j] + "\t" + master [i] .name + "\r";

    }

    }

    }

    var file = new File ("c:/1. txt");

    leader. Open ("w");

    leader. Write (happy);

    leader. Close();

    Kind regards

    Cognet

Maybe you are looking for