Need a little JavaScript help with disabling a select list in a tabular frm

Hello Folks
Here's the scenario.
I have a tabular form which, subject to the setting of one Select List, I want to disable/enable another.
I have got this far and it will disable a text item but not a select list..
This is in the HTML header section for the page...
<script type="text/javascript">
function test(pThis)
var currIndex = $('select[name="'+pThis.name+'"]').index(pThis);
if (pThis.value=='2') {
$('input[name="f02"]')[currIndex].style.backgroundColor = "LightGrey";
$('input[name="f02"]')[currIndex].disabled=true;
The report region is defined as...
SELECT apex_item.text(1, ir.iot_rebate_type_id) iot_rebate_type_id
,apex_item.select_list_from_lov_xl(2,ir.rebate_currency,'LOV_CURRENCY_CODES') rebate_currency
FROM iot_rebate ir
WHERE ir.iot_agreement_id = :P303_IOT_AGREEMENT_ID
The iot_rebate_type_id column has an Column Element Attribute set to...
onchange="javascript:test(this);"
As I say, if I define the rebate currency as a text item, the javascript works fine.
Can anyone offer any suggestions?
Many thanks
Simon
Application Express 4.0.2.00.07

Simon Gadd wrote:
Hi Vikram.
That's great.
I have the relevant items being set to diabled & grey (and also the reverse of this if the driving select list is changed back).
As this is being used in a Tabular form, if I am calling pre-existing records which should be displayed with two of the select lists disabled, can you point me in the right direction to show the relevent select lists as disabled when the records are returned from the database?If you are using apex_item API set the disabled property into p_attributes parameter conditionally using a case statement in you sql statement
Another option is you can use some javascript to loop through the tabular form array that runs on the onload of the page.
Finally, if some columns are disabled, this invaludates the MRU process on the page. Is there a way to submit the page with some fields in the disabled state?Do that as per Roel's suggestion for this issue.
Any input/pointers much appreciated.
Simon

Similar Messages

  • Need help with disabling fields or hiding rows based on previous field

    Hi,
    I have a report in a region.
    The report has five columns:
    Animal type_ Health Issues* Angel Grant Requested?* Granted?* Grant Response Date*
    Dog Fleas Yes Yes 02/04/2009
    Cat Fleas No
    The first time the screen is displayed only the Animal type_ Health Issues* Angel Grant Requested?* columns will appear.
    The user will make a selection for 'Angel Grant Requested' from the LOV ('YES', 'NO') and then click on the 'Submit' button.
    When the screen returns 'Angel Grant Requested?' will be grayed out so the user cannot change the selection. The user will make a selection for 'Granted?' using LOV ('YES, 'NO') and for 'Grant Response Date' using the calendar.
    {color:#ff0000}{color:#0000ff}Here is what I want to do...
    If the user selects 'NO' for 'Angel Grant Requested?' then I would like to do one of the following (which ever one is easiest to do) when the screen returns:
    1. Disable (gray out) the 'Granted?' and 'Grant Response Date' fields on the screen for the rows that have 'NO' for 'Angel Grant Requested?'
    so that the user cannot make any selection, AND update the HEALTH_ISSUES table to
    set grant_granted = 'N/A'
    grant_response_date = sysdate
    WHERE animal_issue_type_id = AI_ID;
    2. Do not display the rows that have 'NO' for 'Angel Grant Requested?'
    {color}
    Can you please provide code samples to do this?
    {color:#ff0000}*I tried to use javascript to gray out the columns, the problem I have is with the hidden f02 column (Angel Grant Requested) that I created on the report so that javascript could read the value. columns are being disabled as desired but the database table is not updating properly...*
    {color:#ff0000}*For the rows where the user selected 'YES' for 'Angel Grant Requested?' we need to update the table with the 'Granted?' and 'Grant Response Date' values. These values are somehow being put on the row where the user selected 'NO' for 'Angel Grant Requested?'.*
    This happens in the UPDATE_ISSUES PL/SQL after When :P6_DSP_REQUESTED = 'DSPGRANTED'{color}
    Below is the Javascript function that is in HTML HEADER:_
    &lt;/script&gt;
    &lt;script language="JavaScript1.1" type="text/javascript"&gt;
    function checkAngelGrant()
    var col2=document.forms[0].f02; /* angel grant requested */
    var col3=document.forms[0].f03; /* angel grant granted */
    var col4=document.forms[0].f04; /* grant response date */
    for (i=0;i&lt;col2.length;i++)
    var col2Check = col2+.value; /* read the hidden angel grant requested field */+
    +/* checks the hidden angel grant requested field+
    if no then we need to disable the angel grant granted field and the angel response date field.
    if (col2Check == 'NO')
    +{+
    col3.disabled=true; /* angel grant granted (Yes No) */
    col4.disabled=true; /* angel response date
    Below is the UPDATEISSUES PL/SQL process that is run on After Submit:_*
    DECLARE
    ai_id NUMBER;
    vgrant_requested VARCHAR2(3);
    vgrant_grnted VARCHAR2(3);
    vgrant_respdate DATE;
    f01 = Animal Issue Type ID
    f02 = grant requested ('YES','NO')
    F03 = grant granted ('YES','NO')
    F04 = grant response date
    P6_DSP_REQUESTED = DSPGRANTED display region with grant_granted and grant_respdate
    P6_DSP_REQUESTED = DSPREQUESTED display region with grant_requested only
    P6_DSP_REQUESTED = BIFNOCHG cannot change any of the fields that have already been set
    BEGIN
    IF :P6_DSP_BEQUESTED = 'DSPREQUESTED' then -- Allow setting of grant_requested value only
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    ai_id := HTMLDB_APPLICATION.G_F01(i); -- animal_issue_type_id This is hidden
    vgrant_requested := HTMLDB_APPLICATION.G_F02(i); -- grant_requested (YES or NO)
    UPDATE HEALTH_ISSUE_TYPES
    SET grant_requested = vgrant_requested
    WHERE animal_issue_type_id = AI_ID;
    COMMIT;
    END LOOP;
    elsif :P6_DSP_REQUESTED = 'DSPGRANTED' then -- grant_granted and grant_response_date
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    ai_id := HTMLDB_APPLICATION.G_F01(i); -- animal_issue_type_id This is hidden
    vgrant_grnted := HTMLDB_APPLICATION.G_F02(i); -- grant_granted (YES or NO)
    vgrant_respdate := to_date(HTMLDB_APPLICATION.G_F03(i),'MM/DD/YYYY');
    UPDATE HEALTH_ISSUE_TYPES
    SET grant_granted = vgrant_grnted,
    grant_response_date = vgrant_respdate
    WHERE animal_issue_type_id = AI_ID;
    COMMIT;
    END LOOP;
    end if;
    END;

    It's actually three reports that get run during different stages of the screen.
    When the user first enters the screen the data is populated from the REQUESTED REPORT sql:
    SELECT hit.animal_issue_type_id, at.animal_type_desc, it.issue_type_desc, hit.grant_requested
    FROM health_issue_types hit, animal_types at,issue_types it
    WHERE hit.animal_type_id = at.animal_type_id
    AND hit.issue_type_id = it.issue_type_id
    AND hit.file_no = :P6_FILE_NO;
    The user will make a selection from the LOV select list (Yes, No) for the grant_requested field and then click on the Submit button.
    {color:#ff0000}*If the user selects 'NO' for this field then I want to disable the grant_granted and grant_response_date fields when the screen is populated from the ISSUES REPORT sql. If this cannot be easily done then I would like to hide the entire row when 'NO' has been selected for the grant_requested field.*{color}
    When the screen returns the data is populated from the ISSUES REPORT sql:
    ISSUES REPORT
    SELECT hit.animal_issue_type_id, at.animal_type_desc, it.issue_type_desc, hit.grant_requested,
    hit.grant_granted, hit.grant_response_date
    FROM health_issue_types hit, animal_types at,issue_types it
    WHERE hit.animal_type_id = at.animal_type_id
    AND hit.issue_type_id = it.issue_type_id
    AND hit.file_no = :P6_FILE_NO;
    At this point the grant_requested field will no longer be available for user modification. The user will make a selection from the LOV select list (Yes, No) for the grant_granted, and the grant_response_date fields and then click on the Submit button again.
    When the screen returns the data is populated from the ANIMAL DISPLAY ONLY REPORT sql:
    ANIMAL DISPLAY ONLY REPORT
    SELECT hit.animal_issue_type_id, at.animal_type_desc, it.issue_type_desc, hit.grant_requested,
    hit.grant_granted, hit.grant_response_date
    FROM health_issue_types hit, animal_types at, issue_types it
    WHERE hit.animal_type_id = at.animal_type_id
    AND hit.issue_type_id = it.issue_type_id
    AND hit.file_no = :P6_FILE_NO;
    At this point the grant_requested, grant_granted, and grant_response_date fields will no longer be available for user modification.
    {color:#0000ff}Thank you for taking the time to look at my problem.{color}

  • N00b is in ddesperate need of some SQL help with parameters

    SO I am trying to create a report that will allow the operator to select an application name (appname from table) which I have working as a ripoff of the AdventureWorks db for passing parameters (stored procedure);
    USE [Test]
    GO
    /****** Object:  StoredProcedure [dbo].[App_Get]    Script Date: 2/19/2015 9:40:58 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[App_Get]
    @GetName NVARCHAR(500)
    AS
    BEGIN
    ;WITH CTE1
    AS
    SELECT CAST(('<i><j>' + REPLACE(@GetName, ',', '</j></i><i><j>') + '</j></i>' ) AS XML) CSV
    ),CTE2
    AS
    SELECT CAST(i.query('./text()') AS VARCHAR(100))CSV
    FROM CTE1
    CROSS APPLY CSV.nodes('/i/j') As x(i)
    SELECT * FROM ae_apps
    WHERE appname IN (SELECT * FROM CTE2)
    END
    AND I have the script that will allow me to pull the information from the multiple tables;
    select ae_login.usrid, ae_login.usrnam, ae_login.fullnam, ae_audit.tsstamp, ae_audit.eventid, ae_agdesc.description, ae_audit.appid, ae_apps.appname
     FROM ae_login, ae_audit, ae_agdesc, ae_apps
     WHERE ae_login.usrid = ae_audit.usrid
     AND ae_audit.eventid = ae_agdesc.eventid
    AND ae_audit.appid = ae_apps.appid
    order by ae_audit.appid, ae_audit.tsstamp
    BUT I do not know how to tie that selected parameter (appname) from the dropdown list.  Essentially I want the operator to select the (appname) and have the report generate the audit information from script above for just that selected (appname). 
    Any Thoughts would be appreciated.

    Hi cnelsonaa27,
    According to your description, you want to add parameter to the report, then users can select an application name from the parameter drop down list when they preview the report, but you don’t know how to tie the dataset and parameter, right?
    To achieve the goal, please refer to the following steps:
      1. In design surface, in Report Data pane, right-click Data Sources and click Add Data Source.
      2. Type data source name, select Embedded connection, then type select Type and type connection string, or select a shared data source.
      3.Right-click Datasets and click Add Dataset.
      4.Select Use a dataset embedded in my report, the default name is Dataset1, then select data source you added in step2, then copy the query to Query text box:
    select ae_login.usrid, ae_login.usrnam, ae_login.fullnam, ae_audit.tsstamp, ae_audit.eventid, ae_agdesc.description, ae_audit.appid, ae_apps.appname
    FROM ae_login, ae_audit, ae_agdesc, ae_apps
    WHERE ae_login.usrid = ae_audit.usrid
    AND ae_audit.eventid = ae_agdesc.eventid
    AND ae_audit.appid = ae_apps.appid
    order by ae_audit.appid, ae_audit.tsstamp
      5.Right-click Datasets and click Add Dataset.
      6.The default name is Dataset2, select data source from drop down list, then copy the query used to create parameter to Query text box.
      7.Right-click Parameters and click Add parameter, type parameter name and prompt.
      8.Click Available Values in left pane, select Get values from a query, select Dataset2 from Dataset drop down list, select appname as Value field, select appname as Label field.
      9.Right-click Dataset1 to open Dataset Properties dialog box, click Filters in left pane, click Add button.
      10.Select appname from Expression drop down list, set Operator to =, then set value to [@ParameterName], click OK.
    For more information about Adding Parameters to a Report, please refer to the following document:
    https://technet.microsoft.com/en-us/library/aa337432%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Cascading select list in a tabular form -plz help me out

    hello,
    how can i implement cascading select list for filtering my tabular form report results.
    Like i want to have the cascading select list's above the tabualr form report such that when i select the value in one select list, this should populate the values in other select list box(like one select list is dependent on other select list) and try to click a button say refresh, my tabular form report should be refreshed and should filter the report based on the select list value.
    i want to have three select list items above my report - and these select list are dependent on one other - tats why i want to make them cascading select list.
    can anyone provide me with an example of the cascading select list.
    can anyone help me out with cascading select list.
    thanks.

    Aplication item is always hidden - Shared Components > Application Items. You can create only one item and that would also be enough. For transparency purposes I said to create two. However, one will do the job.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Need help with disabling the output excution command

    hey guys
    i'm doing an assignment in which user can input multiple lines. I'm using the scanner class. The problem i'm facing is that when user gives their input in multiple lines then it displays the asking input line even though it doesn't ask for new input because the pervious input stored in the memory. Please help me to disable it somehow. I understand the logic and everything but i can't find a way to disable that line. Here's my code:
    print("Please enter words to be converted into Swedish Chef or \"END\" to stop");
            inputText = input.nextLine();
            while (!inputText.equals ("END")  ) {
                // separate the text and punctuations
                removePunctuations();
                // translate all the input text
                for (int i = 0; i < inputWOP.length; i++ ) {
                   translateText(inputWOP);
    // display the translated text inculding all the punctuations
    printTranslatedText();
    System.out.println();
    /** the problem is on this line, logically it make sense that
    * this will be displayed until "END" isn't entered
    * but i want this line not to excute if there's multiple line input
    print("Please enter words to be converted into Swedish Chef or \"END\" to stop");
    inputText = input.nextLine();
    Please help me to solve this problem, thanks in advance!

    salubad,
    Do you really understand your logic? This is a classic while !EOF loop gone wrong... Examine your own code I'm sure you'll get it.
    /** the problem is on this line, //YEP
    logically it make sense that
    * this will be displayed until "END"
    isn't entered //DOES IT REALLY?
    * but i want this line not to excute if
    there's multiple line input //yep, just make it so.
    rint("Please enter words to be converted into Swedish
    Chef or \"END\" to stop");
    inputText = input.nextLine();
    Keith.

  • Need help with disabled ipod

    my son forgot his password need to fix it before christmas please!!!!!

    It will need to be restored. http://support.apple.com/kb/ht1212

  • Need a bit of help with css and fullscreen

    I am currently doing a javaFX application for my university project, I have it everything nearly finished, but need to finish the css component to make the application "prettier" (I am not very good on graphic design to be honest). So if i could get a bit of help on this little issue I'd be very grateful.
    is there any way to make fullscreen (and if possible resizing window) to instead rearranging everything to actually do a fullscreen (like the games) and everything "grows accordingly (even though in games what it usually does is to change the screen resolution, is that possible to reproduce with javaFX?) also how to remove the message and the effect on click the "esc" key to exit the fullscreen mode?
    i know that removing the focus effect on an element is with the following (if a button)
    .button:focused{
         -fx-background-insets: 0;
    }but,is there any way to remove the effect on anything focused (TextField, Combo Box, ...)? (tried with a .textfield:focused but it did not work)
    also i wanted to produce the focused effect by this way but it didn't work, how should i do it? (in fact even if i try to put this line on the button:focused, the focused effect gets removed from there, because of the insets line)
    #highlight{
         -fx-background-insets: 2;
         -fx-background-color: yellow;
    public class controller extends StackPane implements Initializable{
         public void highlight(){
              this.getStyleClass().add("highlight");
    and last thing (for the moment) the .button seems to work for all the buttons, but trying another thing like .gridpane or .textfield or .scrollpane does not seem to work, is there any way to make it work or i should add "id" to all the elements and use the # instead?

    i wrote all them in the same thread becsause there were a total of 4 (and could had been more) separated by ----
    should i leave it how it is or open now 4 threads for each question?

  • Need Some Brain Storming Help WIth a Long Distance Mail Problem

    I would really appreciate anyones input on this...
    Here's the situation. I'm trying to solve a mail problem for my somewhat elderly Mother. The biggest problem is that she is 3800 miles away from me and nowhere near any sort of help or tech support (Rural Alaska) so I'm trying to sort this out over the phone.
    Anyway, she somehow screwed up her mail. All of a sudden the mail she sends comes from MY account! It shows up in my mailbox as having been sent by me. She is using an iBook G4 that I gave her a year or so ago and I suppose it's possible that somehow my mail account was on there somewhere (?). It's like she accidentally switched users or something.
    I have sent her Email to her normal .Mac email address and it does indeed show up in her mailbox when I check the web mail. She is running Tiger and I'm running Leopard.
    I just can't for the life of me figure out what she would have done and I'm hoping that someone might have an idea. She says that the font sizes all changed as well which leads me to believe that she is indeed using my old settings and mail account.
    Once again, any help really appreciated. I'm heading out of town for a week and she really depends on her email. I'm trying desperately to get this solved before I leave. Thanks!

    It looks like Mail has reset its preferences, including the account settings. What follows is a more thorough explanation that should allow you to determine whether that’s really what happened and what your options would be in that case. I’ll provide the full instructions I usually provide to solve this problem when having direct access to the computer, even though you may find some of them not practical or unnecessary.
    Under some circumstances (e.g. lack of available disk space, filesystem corruption, repeated crashes), Mail may discard the current ~/Library/Preferences/com.apple.mail.plist preferences file and create a new one. This file is where all the account settings are stored. As a result, all the non-.Mac account settings are lost. If you have a .Mac account, however, that account would appear to have been preserved because Mail would set it up automatically using the System Preferences > .Mac settings — but may result in a different .Mac account being automatically set up if for some reason the System Preferences > .Mac settings differ from what until then were the Mail account settings...
    What’s the capacity and space available on the startup disk? Take a look at the comments about disk space in the following article, in case they apply to this case:
    Problems from insufficient RAM and free hard disk space
    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what’s it all about?
    After having fixed all the filesystem issues, if any, and ensuring that there’s enough space available on the startup disk (a few GB, plus the space needed to make a backup copy of the Mail folder), quit Mail if it’s running, and make a backup copy of the ~/Library/Mail folder (e.g. by dragging it to the Desktop while holding the Option (Alt) key down), just in case something else goes wrong while trying to solve the problem. This folder is where all your mail is stored.
    There are at least three ways to restore the account settings:
    (1) Restore ~/Library/Preferences/com.apple.mail.plist from a backup if you have one. Mail shouldn’t be running while you do this.
    (2) Set up your mail accounts again (you may want to quit Mail and trash the new com.apple.mail.plist first to start over). If given the option to import existing mailboxes or something like that, don’t. Just enter the account information and Mail will automagically rediscover the data in ~/Library/Mail/ when done. You’ll also have to re-configure some of the Mail > Preferences settings. For spam-related security reasons, the first thing you should do is go to Preferences > Viewing and disable Display remote images in HTML messages if it’s enabled.
    (3) Mail may have renamed the old preferences file to com.apple.mail.plist.saved. If that’s the case, you may try trashing the new com.apple.mail.plist and renaming the old com.apple.mail.plist.saved back to com.apple.mail.plist. Again, be sure Mail isn’t running while doing this. Given the circumstances, there exists the possibility that com.apple.mail.plist.saved became corrupt, but that often is not the case and the settings can usually be restored by just renaming the file back to com.apple.mail.plist.
    As a side effect of re-creating com.apple.mail.plist, Mail might rename Outbox (which is where messages waiting to be sent are stored) to Delivered. The name of that mailbox is actually a misnomer, as it would contain messages (if any) that couldn’t be delivered for some reason. You can delete that mailbox if you wish.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. That is, ~/Library is the Library folder within the user’s home folder, i.e. /Users/username/Library.

  • JavaScript:  Help with IF Statement

    I am not familar with Java and I have been fighting with this IF statement and I cannot get it to work.  I am sure it is something fairly basic.  Can anyone help?  I have seeminly tried everything.  In this example below I am trying to check if the data the user has entered in the FAVOR field is AAA and if it is then put up a message and if it isn't then put up a different message.  My top node in my hierarcy is data and then I have a MainSubform and then a Contact02Subform.  I have this code attached to a button and notthing happens when I click the button.  If I remove the if statement and just have the message box by itself then it shows the message box.  So I know it is my IF statement and I am sure it is simple.  Help please?
    if (xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR").rawValue == 'AAA')
      xfa.host.messageBox("My IF"); else;  xfa.host.messageBox("My ELSE");
    endif;

    Try this.
    if (xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR"). rawValue == 'AAA')
              xfa.host.messageBox("My IF");
    else
               xfa.host.messageBox("My ELSE");
    endif is used in FormCalc generally not in JavaScript.
    Thanks,
    Bibhu.

  • Need help to disable input selection-screen - very urgent

    Hi SAP experts,
    I have a requirement where in I need to disable ( Grey out ) the input fileds on the selection screen .
    My problem is as I am using ABAP query I am not able to use any events ( AT SELECTION-SCREEN OUTPUT ).
    My selection screen looks like this
    MATERIAL NUMBER ( SELECT-OPTIONS)
    MATERIAL TYPE ( PARAMETERS )
    Now I want to add one more check box below the above fields on the selection-screen.When I click on the check-box,the MATERIAL NUMBER  must be greyed out and MATERIAL TYPE should remain the same.
    Please let me know the coding for the same. All answers would be rewarded.
    Thanks in Advance,
    Suresh.

    Hi,
    Check out these codes.
    1.
    TABLES : mara, makt.
    parameter: p_matnr type mara-matnr,
               p_maktx type makt-maktx.
    at selection-screen output.
    select single maktx
    from makt
    into p_maktx
    where matnr = p_matnr
    and spras = 'EN'.
    loop at screen.
      if screen-name = 'P_MAKTX'.
        screen-input = 0.
        modify screen.
      endif.
    endloop.
    2.
    TABLES : mara, makt.
    TYPES:BEGIN OF tp_maktx,
          maktx TYPE makt-maktx,
          END OF tp_maktx.
    DATA:t_maktx TYPE STANDARD TABLE OF tp_maktx,
         wa_maktx TYPE tp_maktx.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    SELECT-OPTIONS: s_maktx FOR makt-maktx.
    INITIALIZATION.
      REFRESH s_maktx[].
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'S_MAKTX-LOW' or screen-name = 'S_MAKTX-HIGH'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
      REFRESH s_maktx[].
      if s_matnr[] is not initial.
      SELECT maktx FROM makt
      INTO TABLE t_maktx
      WHERE matnr IN s_matnr
      AND spras = 'EN'.
      endif.
      LOOP AT t_maktx INTO wa_maktx.
        s_maktx-low = wa_maktx-maktx.
        APPEND s_maktx.
        CLEAR:wa_maktx.
      ENDLOOP.
    3.
    TABLES : mara, makt.
    parameter p_cb1 type c as checkbox.
    parameter p_cb2 type c as checkbox.
    parameter p_cb3 type c as checkbox.
    initialization.
    loop at screen.
    if screen-name = 'P_CB3'.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.
    at selection-screen output.
    *loop at screen.
    *if screen-name = 'P_CB3'.
    *screen-invisible = 1.
    *modify screen.
    *endif.
    *endloop.
    loop at screen.
    if p_cb1 = 'X'.
      if screen-name = 'P_CB2'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB3'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    if p_cb2 = 'X'.
      if screen-name = 'P_CB3'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB1'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    if p_cb3 = 'X'.
      if screen-name = 'P_CB1'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB2'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    endloop.
    Reward if helpful..
    Regards.

  • Need help with ouput of a list or array of numbers input from user

    I'm only a few weeks into learning java, so this may seem simple to some, but...
    I am trying to write a program that will receive numbers from a user,
    and then list, add, average those numbers. I've got the program to
    work except for listing the numbers that were input.
    Can someone help guide me????
    i've left the code I've tried in as comments.
    Enter an integer value, the program exits if the input is 0:
    20
    Enter an integer value, the program exits if the input is 0:
    40
    Enter an integer value, the program exits if the input is 0:
    60
    Enter an integer value, the program exits if the input is 0:
    80
    Enter an integer value, the program exits if the input is 0:
    0
    Total numbers entered: 4
    The array of numbers is: 0 0 0 0
    The sum is 200
    The average is 50
    The maximum number is 0
    The minimum is 0
    Here is my code:
    * Title:        Reads integers and finds the total, average, maximum of the input values
    * Description:
    * Copyright:    Copyright (c) 2002
    * Company:      Duke Court.
    * @author Mary Davenport
    * @version 1.0
    public class part3page6
      public static void main(String[] args)
      int data = 0;
      int sum = 0;
      int countnum = -1;
      int maximum = 0;
      int minimum = 0;
      int average = (countnum - 1);
      do
          System.out.println("Enter an integer value, " +
            " the program exits if the input is 0:  ");
          data = MyInput.readInt();
          sum += data;
          countnum++;
        } while (data != 0);
          //in order to figure the max & the min it appears that the
        //program will need to utilize arrays to store the individual numbers
        //that are input from the user.
        //create an array of the input data
        int[] number = new int[countnum];
        //creat a list of the input data
        int []myList = {data};
        //lists how many numbers entered
        System.out.println("Total numbers entered:  " + number.length);
        //list array of numbers -- this is giving me [I@3179c3,
        //instead of 20, 40, 60, 80 when I use "new int[countnum]"
    //     System.out.print("The array of numbers is: "
    //      + new int[countnum]);
        //list array of numbers:  this is giving me " 0 0 0 0 "
           //instead of 20, 40, 60, 80  with the following for statement
           // (number[i] + " ")
        System.out.print("The array of numbers is: ");
          for(int i=0; i<number.length; i++)
            System.out.print(number[i] + "  ");
      //list mylist of numbers from input, 20, 40, 60, 80
      //output is The list of numbers is: [I@3179c3
    //  System.out.print("The list of numbers is: " + myList);
        System.out.println();
        System.out.println("The sum is " +  sum);
        average = sum/countnum;
        System.out.println("The average is " + average);
        System.out.println("The maximum number is " +  maximum);
        System.out.println("The minimum is " +  minimum);

    When you input the data you need to save it to the array. Currently you are not saving the value you are just adding it
    ArrayList nums = new ArrayList();
       do
           System.out.println("Enter an integer value, " +
             " the program exits if the input is 0:  ");
           data = MyInput.readInt();
    nums.add(new Integer(data));
           sum += data;
           countnum++;
         } while (data != 0);

  • I Need some assistant and HELP with my iPod Touch  soon

    Note: Look up above at the Top to read my Problem that I am having with my iPod Touch.
    Can Someone Please HELP ME with my iPod Touch, I am running out of patience, normally when I do need help here I usually get help and a reply within ONE day, but I have posted my problem YESTERDAY, why isn't there someone not replying to my request?? I am getting 55 views but no replys, isn't there anyone out there that can help me??
    I need HELP to reset my IPod Touch to where I had it when I was able to send emails. (can't send emails anymore from my iPod Touch)
    I want to be able to sync and send my iPod Touch sent emails info. to my Computer email program, does anyone know how to do that?
    PLEASE HELP ME AND REPLY if you can solve my problem ASAP.
    Trisha Foster

    Agreed! If you want help soon, call Apples paid support line. Now while you were waiting for us to slowly get around to answering you, you could have downloaded the manual for the ipod, so that you understood the function of the mail sync options in itunes. Mail sync only copies the settings needed to access your mail servers, from the mail client on your computer, over to the ipod touch. It does not copy any actual mail messages, and does not copy any settings from the ipod back to your mail program. The advanced section is meant to be used if you have messed up the settings on the ipod itself. It will ignore any changes to bookmarks, contacts, or mail settings depending on which you check, and will copy new information to the ipod. So in your case if you are able to access, and send mail correctly from the account on your mac, then clicking on the sync mail account button in itunes as well as the replace info on this ipod whatever in the advanced section should transfer over the correct mail account settings to your ipod.

  • Help with disabling close icon of last opened tab in JTabbedPane

    Hello
    Would someone help me out ? I have 3 tabs opened in a JTabbedPane, each with close icon "X". I am looking for a way to tell my program: if the user closes 2 tabs and only 1 remain, disable the close icon "X" of the last opened tab so that the user is unable to close the last tab. I have searched the forum, most I have run into are how to create the close icon. Would someone give me some insight into how to go about doing this? or if you have come across a forum that discusses this, do please post the link. Also, I am using java 1.6.
    Thanks very much in advance

    On each close, look how many tabs are remaining open in the JTabbedPane (getTabCount).
    If there is only one left, set its close button to invisible. Something like this:
    if (pane.getTabCount() == 1) {
        TabCloseButton tcb = (TabCloseButton) pane.getTabComponentAt(0);
        tcb.getBtClose().setVisible(false);
    }

  • Need support person for help with loading the adobe reader

    We purchased Adobe reader but it will not load onto my computer and per my boss I need to get help from you.
    my phone number is 813-445-7295 ext 104

    Nobody will ring you, sorry. But perhaps we can help (this is not Adobe staff).
    Let's start with what you purchased. Check your receipt. Adobe Reader is free, nobody should have charged you for that..
    Then, let us know what you mean by "will not load". If you get any messages, please let us know the exact words.

  • Need help with creating invoice and list of invoices

    Hello everybody,
    I need to create Credit / Debit memo invoices and for this I try to use FM GN_INVOICE_CREATE in my Z program, please let me know if it is correct way to go?
    As well I need to create list of Credit / Debit memo invoices, how to achieve this?
    Thanks in advance.
    Usefull answers will be awarded.
    Regards, M.

    You can use RV_INVOICE_CREATE for credit memo and debit memo
    list of credit and debit memo - use this FM - RV_INVOICE_LIST_CREATE
    see the below sample code
    refresh: XKOMFK, XKOMV,
               XTHEAD, XVBFS,
               XVBPA,  XVBRK,
               XVBRP,  XVBSS.
      clear  : XKOMFK, XKOMV,
               XTHEAD, XVBFS,
               XVBPA,  XVBRK,
               XVBRP,  XVBSS,
               VBSK_I.
      VBSK_I-SMART = 'F'.
      XKOMFK-VBELN =  v_deliv.
      XKOMFK-VBTYP = 'J'.
      APPEND XKOMFK.
      CALL FUNCTION 'RV_INVOICE_CREATE'
           EXPORTING
                VBSK_I       = VBSK_I
                WITH_POSTING = 'C'
           TABLES
                XKOMFK       = XKOMFK
                XKOMV        = XKOMV
                XTHEAD       = XTHEAD
                XVBFS        = XVBFS
                XVBPA        = XVBPA
                XVBRK        = XVBRK
                XVBRP        = XVBRP
                XVBSS        = XVBSS.
      if sy-subrc eq 0.
        COMMIT WORK.
       flag = 'X'.
      else.
      message i011 with p_vbeln.
      endif.
    Reward Points if it is helpful
    Thanks
    Seshu

Maybe you are looking for