How to write Java script for refering the 1st page text field from 2nd page?

Hello I am developing an VISITOR info interactive form with webdynpro ABAP, its with 2 pages. Their heirarchy 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 have selected the 'Text_Field_B_1' of page_2 and writing the Java script, my requirement is; If Page_1's 'Text_Field_A_2' has a value of "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";
place script on change event of Text_FieldA_2

Similar Messages

  • How to write Java Scripts in Apex

    Hi All,
    Can any on tell me how to write Java Scripts in Apex.
    Thanks in Advance,
    Mukund

    If you want to link your custom JavaScripts to an Apex page, you have several options:
    1. Add an HTML Region on Page 0 (Script will be written to every page) called something like "JavaScript & CSS". In this region add your Script to the region source like this:
    <script language="JavaScript">
    function hell ()
    alert ("Hello World");
    </script>
    2. Add a similar region to the page you are working on (can only be accessed on this page)
    3. Create an external JavaScript file and either load it into the WORKSPACE or into the images (/i/) directory on the server. You can then link the JS into you page via modifying the Page Template.
    Hope that makes sense. Let me know if you want any further help with option 3.
    Duncs

  • How to write java code to read the pixel color in some place of screen?

    Hello all:
    How to write java code to read the pixel color in some place of screen?
    The java application iteself doesn't have any GUI.
    thank you
    -Danel

    See java.awt.Robot

  • How to remove the automatically generated text fields from the InfoSet

    I followed the procedure by SAP help.
    Automatically generated text fields are marked with a 'T' on the icon in the InfoSet. You can remove the automatically generated text fields from the InfoSet in the initial screen of the InfoSet maintenance under Further Functions -> Delete Text Fields. Cancel the DataSource creation on the next screen and delete the text fields in the InfoSet maintenance transaction.
    I know that there is an option "No automatic text recognition" when I create a new InfoSet, however, I couldn't find out how to change an existed InfoSet. I checked menu Goto->Global Properties, but that option is disabled. Is there a way to remove text fields from an existed InfoSet?

    Hi,
    In the initial screen (when you enter transaction code SQ02) type your infoset name and goto menu: Infoset -> More functions -> Delete text fields. this will delete all text fields.
    I hope this helps to resolve the issue.
    Ram

  • How to write a procedure for update the table

    Hi all
    can any body please tell me how to write a procedure to update the table......
    I have a table with about 10,000 records...........Now I have add a new column and I want to add values for that like
    registration Code Creidits
    13213 BBA
    1232 MCS
    I had add the creidit now i want to update the table.........the new value want to get by SQL like
    Creidit = select creidit from othere_table...........
    Hope u can understand my problem
    Thanks in advance
    Regards
    Shayan
    [email protected]

    Please try the following --
    update Program_reg a
    set TotalCreidit = ( select tot_cr <Accroding to your logic>
                                from Program_reg b
                                where a.Registration = b.Registration
                                and    a.Enrollment = b.Enrollment
                                and    a.code = b.code
    where a.Registration in ( select distinct Registration
                                        from Program_reg );
    N.B.: Not Tested....
    Regards.
    Satyaki De.

  • How to write a script to ask the streaming video (FLV) to do something after it is finised playing...

    How do I write a script to ask a streaming video to go to
    play a next movie clip or to do something after it is finised
    playing automatically?

    follow the link here to get the fla example which I have just
    embeded a movie file straight on the root timeline and then I add
    another layer for scripting. look at the last frame of the timeline
    where I have add a very simple gotoAndPlay script.
    hope ths is what u looking for. otherwise you really need to
    get flash 8. or hopefully someone coming along on this forum and
    solve the MX problem for you.
    good luck.
    http://www.lauthiamkok.net/scripting_languages/ActionScript/Flash_8/video%20object/
    get this file - embeded video.fla

  • How to write SAP Script for AP/AR?

    Hi,
    I would like to know how to prepare a SAP Script for AP/AR. Can anybody help.
    Thanks
    ST

    Hi,
    I would like to know how to prepare a SAP Script for AP/AR. Can anybody help.
    Thanks
    ST

  • How to write a formula that includes the value of a cell from another external numbers file ?

    Hello,
    Maybe my Numbers is too old : Numbers '08 v 1.0.3
    But it doesn't seem to allow me to write a formula that includes the value of an external cell...
    Any answers ?
    Upgrading to Numbers '09 ?
    Thanks !

    Olivier,
    Be sure to Send Feedback to Apple using the Feedback tool in the Numbers menu. That will help the Numbers design team prioritize their feature requests for the next version.
    Jerry

  • How to write select query for all the user tables in database

    Can any one tell me how to select the columns from all the user tables in a database
    Here I had 3columns as input...
    1.phone no
    2.memberid
    3.sub no.
    I have to select call time,record,agn from all the tables in a database...all database tables have the same column names but some may have additional columns..
    Eg: select call time, record,agn from ah_t_table where phone no= 6186759765,memberid=j34563298
    Query has to execute not only for this table but for all user tables in the database..all tables will start with ah_t
    I am trying for this query since 30days...
    Help me please....any kind of help is appreciated.....

    Hi,
    user13113704 wrote:
    ... i need to include the symbol (') for the numbers(values) to get selected..
    eg: phone no= '6284056879'To include a single-quote in a string literal, use 2 or them in a row, as shown below.
    Starting in Oracle 10, you can also use Q-notation:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#i42617
    ...and also can you tell me how to execute the output of this script. What front end are you using? If it's SQL*Plus, then you can SPOOL the query to a file, and then execute that file, like this:
    -- Suppress SQL*Plus features that interfere with raw output
    SET     FEEDBACK     OFF
    SET     PAGESIZE     0
    -- Run preliminary query to generate main query
    SPOOL     c:\my_sql_dir\all_ah_t.sql
    SELECT       'select call time, record, agn from '
    ||       owner
    ||       '.'
    ||       table_name
    ||       ' where phone_no = ''6186759765'' and memberid = j34563298'
    ||       CASE
               WHEN ROW_NUMBER () OVER ( ORDER BY  owner          DESC
                              ,        table_name      DESC
                              ) = 1
               THEN  ';'
               ELSE  ' UNION ALL'
           END     AS txt
    FROM       all_tables
    WHERE       SUBSTR (table_name, 1, 4)     = 'AH_T'
    ORDER BY  owner
    ,       table_name
    SPOOL     OFF
    -- Restore SQL*Plus features that interfere with raw output (if desired)
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    -- Run main query:
    @c:\my_sql_dir\all_ah_t.sql
    so that i form a temporary view for this script as a table(or store the result in a temp table) and my problem will be solved..Sorry, I don't understand. What is a "temporary view"?

  • How to write a formula for display the value by group

    Post Author: abadugu
    CA Forum: Formula
    Hi
    Could any one please help me on writing the formula for the below senario.
    I'm creating Crystal report Via using ClearQuest (IBM tool) since this tool is not supporting subreport function. I'm planning to write a formula.
    I have grouped report by request_type field (request_type field contains Validation Defect, Production Defect, Known Defect  etc..)
    right now my report output is grouped by request_type
    ex:
    Validation Defect
                         SUMMARY                                                          COMMENTS
    Production Defect
                       SUMMARY                                                          COMMENTS
    my question was
    If request_type = Production Defect  display  pm_number value field otherwise display null
    ex
    Production Defect
    PM#          SUMMARY                                                       COMMENTS
    Validation Defect
                     SUMMARY                                                       COMMENTS
    could you please help me writing a formula.
    Thanks
    Anand

    Post Author: abadugu
    CA Forum: Formula
    It worked Thank you and I appreciated your help
    Thanks

  • How to write Test Script for Rossettanet PIP message to test in RSTK tool.

    Hi All,
    I am new to RSTK i came to know that we need to prepare a test script and place in a Tomcat Server folder, to test any PIP message. Please let me know how we can prepare this Test Script.
    Thanks alot in advance.
    Srinivas.
    Edited by: sri_rambo on Oct 27, 2009 8:08 AM
    Edited by: sri_rambo on Oct 27, 2009 11:34 AM

    Hi,
       Did you check this blog?
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID1594031950DB00395255272980057387End?blog=/pub/wlg/3826
    and this:
    /people/shabarish.vijayakumar/blog/2008/04/28/the-rosettanet-stk-and-how-to-use-it-to-your-advantage
    Regards,
    ravi

  • How to write a script for adding a percentage?

    I have a simple form where I need a cell to automattically add a percentage to a different cell.
    For example in Excel my expression is: =SUM(E9*0.014)  [90*1.4%= 1.26] where as Cell E9 will be the amount I need the percentage to added to. 
    Header 1
    Header 2
    Number
    Surcharge
    90
    =sum(90*.014)
    Thanks,

    Moving this discussion to the Javascript since USA Fire's other inquiry was located in this forum.

  • Using java scripts for pdf

    I am trying to find a sort of tutorial on how to use java scripts for pdf files, particularly in setting up repetitive links between several pdf files.

    Here is a very nice website that has tons and tons of stuff for pdf using java script. Enjoy!
    http://www.planetpdf.com/forumarchive/forum34.htm

  • Remove text field from Array via for loop

    Hi,
    i have a problem to remove text fields added via for loop.
    That im doing is, via for loop im dynamically creating menu with 10 buttons.
    Each button contain, dynamically created, background (shape) and text field.
    And everything is fine.
    But when im try to remove text fields then i got this error:
    - Im using button to remove text fields - lang_btn.addEventListener(MouseEvent.CLICK, clickHandler);
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
              at flash.display::DisplayObjectContainer/removeChild()
              at Loading_Img_fla::MainTimeline/xmlLoaded()
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/onComplete()
    In the script bellow marked with red is what should remove text fields from an Array, instead giving me error.
    Here is my script
    // Create for loop
    for (var i:int = 0; i < 10; i++)
              for each (xml in listItems)
                        if (i == xml.attribute("Id"))
                                  // Add MovieClip to stage to hold the data
                                  addChild(lmHolder);
                                  lmHolder.x = 0;
                                  lmHolder.y = 0;
                                  // Create new MovieClip to hold buttons
                                  lmButtonsMCArray[i] = new MovieClip();
                                  lmButtonsMCArray[i].buttonMode = true;
                                  lmButtonsMCArray[i].mouseChildren = false;
                                  lmButtonsMCArray[i].x = 20;
                                  lmButtonsMCArray[i].y = 20 + btCount * buttonSpace;
                                  // Add each button MovieClip to lmHolder MovieClip
                                  lmHolder.addChild(lmButtonsMCArray[i]);
                                  // Create Background to buttons
                                  lmButtonsArray[i] = new Shape();
                                  lmButtonsArray[i].graphics.beginFill(lmBgColor0, 1);
                                  lmButtonsArray[i].graphics.drawRect(0, 0, 230, 85);
                                  lmButtonsArray[i].x = 0;
                                  lmButtonsArray[i].y = 0;
                                  // <<-- Add Background shape to the buttons MovieClips
                                  lmButtonsMCArray[i].addChild(lmButtonsArray[i]);
                                  // Create a new array to preserve data from XML List
                                  lmNameArrayEG = new Array();
                                  lmNameArrayUS = new Array();
                                  // Create local variable to hold
                                  var lmTxtFieldContentUS:String;
                                  var lmTxtFieldContentEG:String;
                                  var lmTxtContent:String;
                                  // If clicked button is EG then make array with Arabic text
                                  // If clicked button is US then make array with English text
                                  if (footer.lang_btn.langState == "EG")
                                            for each (var leftMenuName:XML in egLanguageList)
                                                      lmNameArrayEG.push(leftMenuName);
                                            lmTxtFieldContentEG = lmNameArrayEG[i];
                                            lmTxtContent = lmTxtFieldContentEG;
                                  else
                                            for each (var leftMenuNameUS:XML in usLanguageList)
                                                      lmNameArrayUS.push(leftMenuNameUS);
                                            lmTxtFieldContentUS = lmNameArrayUS[i];
                                            lmTxtContent = lmTxtFieldContentUS;
                                  // Setup new text field each time script is executed
                                  lmTxtFieldsArray[i] = new TextField();
                                  lmTxtFieldsArray[i].width = 110;
                                  lmTxtFieldsArray[i].border = false;
                                  lmTxtFieldsArray[i].wordWrap = true;
                                  lmTxtFieldsArray[i].multiline = true;
                                  lmTxtFieldsArray[i].selectable = false;
                                  lmTxtFieldsArray[i].embedFonts = true;
                                  lmTxtFieldsArray[i].antiAliasType = AntiAliasType.ADVANCED;
                                  lmTxtFieldsArray[i].autoSize = TextFieldAutoSize.CENTER;
                                  lmTxtFieldsArray[i].text = lmTxtContent.toUpperCase();
                                  lmTxtFieldsArray[i].x = 10;
                                  lmTxtFieldsArray[i].name = "lmTxtFieldName" + i;
                                  // <<-- Add Text fields to the Movie Clip
                                  lmButtonsMCArray[i].addChild(lmTxtFieldsArray[i]);
                                  // If clicked button is EG then set Arabic text format, and make array with Arabic text fields
                                  // If clicked button is US then set English text format, and make array with Egnlish text fields
                                  if (footer.lang_btn.langState == "EG")
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_eg);
                                            // Make array from text fields;
                                            pushEgTFintoArray.push(lmTxtFieldsArray[i]);
                                  else
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_us);
                                            // Make array from text fields;
                                            pushUsTFintoArray.push(lmTxtFieldsArray[i]);
                                  // If clicked button is EG then loop thrue the for loop and remove English text fields from array
                                  // If clicked button is EG then loop thrue the for loop and remove Arabic text fields from array
                                  if (footer.lang_btn.langState == "EG")
                                            for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                      //remove the text field array from the display
                                       removeChild(pushUsTFintoArray[rNr_us]);
                                            //clear the array
                                            pushUsTFintoArray = [];
                                  else
                                            for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                      //remove the text field array from the display
                                       removeChild(pushEgTFintoArray[rNr_eg]);
                                            //clear the array
                                            pushEgTFintoArray = [];
              btCount++;

    it looks like those tf's are children of  lmButtonsMCArray[i], not the current scope.  use:
    if (footer.lang_btn.langState == "EG")
                                            for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                      //remove the text field array from the display
                                        lmButtonsMCArray[rNr_us].removeChild(pushUsTFintoArray[rNr_us]);
                                            //clear the array
                                            pushUsTFintoArray = [];
                                  else
                                            for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                      //remove the text field array from the display
                                        lmButtonsMCArray[rNr_eg].removeChild(pushEgTFintoArray[rNr_eg]);
                                            //clear the array
                                            pushEgTFintoArray = [];

  • I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    Hi,
    May the below code is useful for you, but I dont know how to sort.
    Edit the tag as per your job request.
    alert(app.activeDocument.xmlElements[0].contents)
    //Second alert
    var xe = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote");
    alert(xe.length)
    for(i=0; i<xe.length; i++)
        alert(xe[i].texts[0].contents)
    Regards
    Siraj

Maybe you are looking for