Need a bit of JavaScript help with deactivation of a selection list in a table frm

Hello people

Here's the scenario.

I have a tabular presentation which, subject to the setting from the list, select I want to toggle each other.

I've had to date and it allows to disable a text element, but not a list of selection...

It is in the HTML of the page header section...

< script type = "text/javascript" >
function test (pThis)
{
var currIndex = $('select[name="'+pThis.name+'"]').index (pThis);

If (pThis.value == '2') {}
. style.backgroundColor $('input[name="f02"]') [currIndex] = "LightGrey";
$('input[name="f02"]') [currIndex] .disabled = true;
}
}

The report is defined as...

SELECT iot_rebate_type_id apex_item.text (1, ir.iot_rebate_type_id)
apex_item.select_list_from_lov_xl(2,ir.rebate_currency,'LOV_CURRENCY_CODES') rebate_currency
To iot_rebate ir
WHERE ir.iot_agreement_id =: P303_IOT_AGREEMENT_ID

The iot_rebate_type_id column is an attribute of the column element value...

OnChange = "JavaScript:test (this); »


As I say, if I set the currency of repayment as a text element, the JavaScript works fine.

Can anyone offer any suggestions?

Thank you very much

Simon
Request Express 4.0.2.00.07

Sounds familiar to me...

to manage selection lists change the function javascript like this

   function test(pThis)
   {
    var currIndex = $('select[name="'+pThis.name+'"]').index(pThis);

     if (pThis.value=='2') {
     $('select[name="f02"]')[currIndex].style.backgroundColor = "LightGrey";
     $('select[name="f02"]')[currIndex].disabled=true;
     }
 }

Tags: Database

Similar Questions

  • Help with the query to select only one record from the result set in double

    Hello

    Please help with the query. Version of Oracle database we use is 10g R2.

    I have a vision that is duplicated IDS, but they are used across the different functions. See below examples of data. Please help me with a query to select only one record (based on ID regardless of the area) from the bottom of the result set of duplicate records. For what is the point of view is there unique records, given the combination of the fields ID, Org, DF, dry, Sub-Sec

    ID
    Org
    DF
    Sec Sub-Sec

    (163)CQCPDMCPDMHD(163)PCENGENGENG(163)CQASICASICIS8888TSTACTACTAC(163)TSHEHESW6789CQINFOINFOFOS6789PCSECSYSSECSYSINFO16789TSSECSYSSECSYSINFO29009PCBMSBMSBMS1

    My result set must eliminate the duplicate identifiers regardless of whoever we choose of the result set. (I mean without distinction Org, DF, s, Sub-s). My expected result set should be.

    ID
    DSB

    DF
    SEC
    Sub-Sec
    (163)CQCPDMCPDMHD8888TSTACTACTAC6789CQINFOINFOFOS9009PCBMSBMSBMS1


    Thank you

    Orton

    Hello

    This sounds like a job for ROW_NUMBER:

    WITH got_r_num AS

    (

    SELECT id, DSB, df, s, sub_sec org

    ROW_NUMBER () OVER (PARTITION BY ID.

    ORDER BY org

    ) AS r_num

    OF view_x

    )

    SELECT id, DSB, df, sub_sec s,

    OF got_r_num

    WHERE r_num = 1

    ;

    He is a Top - N query example, where you choose the elements of N (N = 1 in this case) from the top of an ordered list.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and INSERT, only relevant columns instructions) to your sample data and the results desired from these data.  (I know that you said that you were a view selection.  Just for this thread, pretending it is a picture and post simple CREATE TABLE and INSERT statements to simulate your point of view).
    Point where the above query is to produce erroneous results, and explain, using specific examples, how you get the right results from data provided in these places.  (I didn't quite understand the explanation above.  I don't know why you want to

    ID ORG DF DRY SUB_SEC

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

    1234 CQ DPRK DPRK HD

    and is not

    1234 IS CQ ASIC, ASIC

    or

    TS 1234 IT IT SW

    or

    1234 CQ ASIC ASIC HD

    )
    If you change the query at all, post your modified version.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • Need help with the analytical function select maximum and minimum of the results of the column

    Hey there OTN.

    I have an interesting application that I was hoping you would be able to help me with. I have a requirement to conditionally select the max and min of a column in bi-editor and since my editor works from an OBIEE analysis, I need store MAX and MIN of the column values in separate columns to match with. See the example below. You will notice that there are 4 stores including today's sales. I must have OBIEE through all the results of the column for sales, then choose the max of the dataset object. I can't use MAX here because he will choose the MAX of the line which will return only sales of this line. Instead, one must analyze all sales results and choose the appropriate column. Any idea on how to do this in OBIEE/publisher? Or is this not possible.

    Day Store Sales Sales of MAX Sales MIN
    05/11/15Store 1500080001000
    05/11/15Store 2750080001000
    05/11/15Store 3100080001000
    05/11/15Store 4800080001000

    I'm waiting for your answers. Thanks in advance!

    PS: I will always mark messages that are useful and eventually mark it as correct answer if we come to a resolution!

    See you soon.

    You can't do the same thing with RANK ("dirty")?

    Rank ("dirty") = 1: the max value in the result of sales

    RANK (-1 * "Sales") = 1: the min in the result of sales value

    I guess you can and then format the cells based on these values, where a value of 1 is the max or min according to the RANKING formula you used...

  • JavaScript: Help with IF statement

    I'm not familiar with Java and I fight with this IF statement and I can't make it work.  I'm sure it's something pretty basic.  Can anyone help?  I tried everything, seeminly.  In this example below I'm checking if the data that the user has entered in the field of the AAA FAVOR and if it is then put in place a message and if not then set up another message.  My top node in my hierarchy is data, and then I have a MainSubform and a Contact02Subform.  I have this code attached to a button and notthing happens when I click the button.  If I delete the statement and have just the box of message by itself, then it will display the message box.  So I know that's my statement and I'm sure it's 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 (rawValue. xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR") is 'AAA')

    {

    xfa.host.messageBox ("my IF");

    }

    on the other

    {

    xfa.host.messageBox ("my ELSE");

    }

    endif is used in FormCalc are generally not in JavaScript.

    Thank you

    Sidonie.

  • Need help with a self-join select the parent and child

    Hi all

    I have an OFFICE table that will hold the Oncology, district and division of the hierarchic is Oncology-district-> division >

    I want to list Oncology, district and division with its parent of the value of the following
    provinc     district      division
    
    A            NULL       NULL
    A            A.A         NULL
    A            A.A         A.A.A 
    -- Create table
    CREATE TABLE OFFICE
    (
      SLNO         VARCHAR2(20 BYTE),
      OFFICE_NAME  VARCHAR2(20 BYTE),
      PARENT_SLNO  VARCHAR2(20 BYTE),
      TYPE         VARCHAR2(2 BYTE)
    );
    
    ALTER TABLE OFFICE ADD (
      CONSTRAINT OFFICE_PK
      PRIMARY KEY
      (SLNO)
     );
    
    ALTER TABLE OFFICE ADD (
      CONSTRAINT P_C_FK 
      FOREIGN KEY (PARENT_SLNO) 
      REFERENCES OFFICE (SLNO));
    
    
    INSERT INTO OFFICE
      (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE)
    VALUES
      ('1', 'A', NULL, 'PR');
    INSERT INTO OFFICE
      (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE)
    VALUES
      ('2', 'A.A','1', 'DT');  
    INSERT INTO OFFICE
      (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE)
    VALUES
      ('3', 'A.A.A', '2', 'DV');  
    I need your help.
    Thank you.

    Published by: Dipabkar Banik (DB) on June 13, 2011 12:17 AM

    Published by: Dipabkar Banik (DB) on June 13, 2011 12:18 AM

    Published by: Dipabkar Banik (DB) on June 13, 2011 06:45

    Published by: Dipabkar Banik (DB) on June 13, 2011 06:47

    Try this

    SELECT   CONNECT_BY_ROOT (office_name) provinc,
                 DECODE (LEVEL, 2, office_name, PRIOR office_name) district,
                 DECODE (LEVEL, 3, office_name) division
          FROM   office
    CONNECT BY   PRIOR slno = parent_slno
    START WITH   parent_slno IS NULL
    
  • Need help with TS to read the list of variables and/or LV

    Hello

    I use Labview adapter in Teststand to open WinIDEA and read the values of the variables. Basically LV lib files are used to read the value of the variable at run time, and returns the value of the variable. Contribution to this labview function i.e. variable name string and output type cluster.

    I need to read the list of variables and compare it to the value limits for each variable. I perhaps need to read at least 50 to 60 variables in one step if possible or a variable at a time in a loop. I want to add these variables in a txt file with the limits and read of Teststand as a string array and compare the result. In this way is easy to add or remove variables from the list and therefore their expected value. I tried to use the shipper of the property, but there need a stage name or local/global variable.

    Another way is to add the code in labview for comparison of variables value read, then I lose teststand power and flexibility.

    I am struggling to find the best way to achieve this. Any ideas?

    I would like it.  Basically, you have a file limit with 2 data tables.  A table contains your variables and the other your limits.  Then you wrap on a test of a string value.

    Let me know if you have any questions.

  • PLEADING... I NEED help with the boxes, one for each row in table.

    I have a tabular presentation I want to use to process once that will process once for each line that has had its check box selected. I worked on it... It seems... forever. I almost gave up. More than once I thought I had it all to find that I have no work.

    It seems always executed once for each row in the set of lines in the displayed table and I care about her contract so that the lines checked.

    Here is my select statement...
    Select
    APEX_ITEM. CHECKBOX (2, ISSUE_KEY, DECODE (issue_closed, 'Yes', 'CLOSED', 'No', 'DISABLED', null)) CHECK_KEY;
    TO_CHAR (ISSUE_DATE, ' ' DD-MON-YYYY HH24:MM:SS) FAILURE_DATE,.
    ISSUE_COMMENTS
    QUESTIONS


    I have a submit button that runs the following process
    DECLARE
    v_org_comments varchar2 (1024): = ";
    BEGIN
    BECAUSE me in 1... APEX_APPLICATION. G_F02. COUNTING LOOP
    SELECT ISSUE_COMMENTS
    IN v_org_comments
    QUESTIONS
    WHERE ISSUE_KEY = APEX_Application.g_f02 (i);

    UPDATE PROBLEMS
    SET
    ISSUE_COMMENTS = v_org_comments | » ' || : P4_X_ODF_NOTES,.
    ISSUE_CLOSED = "Yes"
    where ISSUE_KEY = APEX_Application.g_f02 (i);
    COMMIT;
    END LOOP;
    END;

    Hello

    I had the same problem. It seems that if you pass your columns to the columns in standard report it will fire for the checked columns. But if you proceed towards editable fields each line is treated as checked.
    So if you use line selector instead of manually creating check boxes and have a hidden primary key
    field, you can then use something like

    BECAUSE me IN 1.APEX_APPLICATION. G_F01. COUNTING LOOP
    UPDATE


    SET
    WHERE =
    APEX_APPLICATION. G_F02 (APEX_APPLICATION. G_F01 (i));
    END LOOP;

  • Help: Autofill numbers in drop-down list to another table

    Hello world

    Does anyone know how to automatically fill in a table of the value of the other table, based on the selected menu drop-down on the main table.

    As you can see on my pictures, my main table, I have a drop down list, so I have to be able to automatically to the second table based on the category that I chose to put the quantity. For example, I choose LIFE, then the amount will also be the second table where the arrow is pointing. What will be the formula on the designated table?

    Thank you.

    Hello Adrian TitikTemu,.

    As a reminder, you want autofill value of 1 sheet on a column on sheet 2 in number. One of the members of our community of colleagues gave some great instructions on how to proceed in this post:

    https://discussions.Apple.com/thread/7554247?start=0 & tstart = 0

    The response of Apple recommends that Barry has a few milestones to help in a situation like this.

    Best regards

  • ORDER BY with ROWNUM in the selection list

    Hello

    I have the query as the bellows for Oracle 11 g:

    create the table em_c (int vl_s_ec, int id_em_em, int id_empcre_ecr, int id_em_ec);

    create em table (int id_em_em)

    Select e.id_em_em
    NVL)
    (SELECT * FROM (SELECT a.vl_s_ec FROM em_c a WHERE a.id_em_em = ec.id_em_em))
    AND a.id_empcre_ecr < ec.id_em_ec order of a.id_em_ec DESC) WHERE ROWNUM < = 1), 0) AS col2
    Of em_c ec
    INNER JOIN em e on ec.id_em_em = e.id_em_em
    WHERE 1 = 1;

    But internal subselect doesn't see table "em_c ec" of outer FROM clause. This is why the following error occurs:

    SQL error: ORA-00904: "EC". "" ID_EM_EC ": invalid identifier

    Please, help me to make it work.

    Published by: user11290901 on December 17, 2010 02:11
    SELECT  e.id_em_em,
            (
             SELECT  nvl(max(a.vl_s_ec) KEEP(DENSE_RANK LAST ORDER BY a.id_em_ec),0)
               FROM  em_c a
               WHERE a.id_em_em = ec.id_em_em
            ) AS col2
      FROM  em_c ec
      INNER JOIN em e on ec.id_em_em = e.id_em_em
      WHERE 1 = 1
    /
    

    SY.

  • Need help with a SQL query

    Hello

    I have a data in table (raj_table) with columns (char11) raj_id, raj_number (varchar2 (15)), raj_format (NUMBER), Primary_ID (identity with the values of the primary key column)

    Primary_ID raj_id Raj_number Raj_format

    1                            raj                 rajvend                      1

    2                            raj                 rajvend                      1

    3                            raj                 rajvendor1                 2

    4                            raj                 rajvendor1                 2

    5                            raj                 rajvendor1                 2

    6                            raj                 rajvendor2                 3

    I used under SQL to get query output as below, but has not achieved the required result:

    Select client_id vendor_number, vendor_format, primary_id, row_number() on sl_no (client_id partition, primary_id, vendor_format order of client_id primary_id, vendor_format, vendor_number, vendor_number)

    from raj_table by sl_no asc

    SL_NO raj_id raj_number raj_format primary_id

    1                   1                   raj              rajvendor                 1

    1                   2                  raj              rajvendor                 1

    2                   3                   raj              rajvendor1                2

    2                   4                   raj              rajvendor1                2

    2                   5                  raj               rajvendor1                2

    3                   6                    raj              rajvendor2                3

    I need help with a SQL query to get the result as above without using the group by clause. I want to bring together the combination of separate line of the three columns (raj_id, raj_number, raj_format) and add a unique serial number for each online game (SL_NO column below). So, above there are 3 unique set of (raj_id, raj_number, raj_format) I can get in a group by clause, but I can not add prmiary_id, SL_NO values if I group by clause. I used the analytical functions like row_number() but no luck. Need solution for this.

    with t as)

    Select 'raj' raj_id, 'rajvend' raj_number, 1 raj_format, 1 primary_id Union double all the

    Select option 2, 'raj', 'rajvend', 1 double Union all

    Select 3, 'raj', 'rajvendor1', 2 double Union all

    Select 4, 'raj', 'rajvendor1', 2 double Union all

    Select 5, 'raj', 'rajvendor1', 2 double Union all

    Select 6, 'raj', 'rajvendor2', 3 double

    )

    Select dense_rank() over (order of raj_id, raj_number, raj_format) sl_no,

    t.*

    t

    order by primary_id

    /

    PRIMARY_ID RAJ RAJ_NUMBER RAJ_FORMAT SL_NO
    ---------- ---------- --- ---------- ----------
    1 1 raj rajvend 1
    1 2 raj rajvend 1
    2 3 raj rajvendor1 2
    2 4 raj rajvendor1 2
    2 5 raj rajvendor1 2
    3 6 raj rajvendor2 3

    6 selected lines.

    SQL >

    SY.

  • need help with the query, thx

    Hello
    I need a little help with the query I have to write;
    the table has 4 columns:
    col1               col2         col3       col4
    emp_name     empl_id    salary      year
    
    content of data:
    
    col1               col2         col3       col4
    smith             12           1200      1999
    smith             12           1340      2000
    smith             12           1500      2001
    jones             13           1550      1999 
    jones             13           1600      2000
    aron              14           1200      2002
    what I am asking is the following result: salary according to the latest available year
    i.e.
    smith         12         1500        2001
    jones         13         1600        2000
    aron          14         1200        2002
    ID appreciate some guidance on how to achieve
    Thank you
    Rgds
    select *from
    (select col1, col2,col3, col4,row_number() over(partition by col1 order by col4 desc)  rn  from 
    ) where rn=1
    
  • Help with selection lists in the classic report

    Hello

    I work with APEX 4.1. Oracle 11.

    I have a simple and classic report with 4 columns (username, role, reading, updating). The columns of the reading and the update are select list with values of 'Yes', 'no '.

    Report looks like this:

    User role name read the update
    JSmith Admin Yes Yes
    LJones Dev yes no


    My requirement is that when the user selects Yes the update select list, the value of the associated column in the reading should change Yes as well for this particular user name. Change must occur after Yes is selected in the list select update.

    Im not very strong with javascript, but for testing purposes I applied: onchange = "alert ('hi'); "in the update column. When I make a change to the update select list, the alert returns to its position.

    Can anyone suggest how I can implement the change to the value of associated reading of Yes if the selected update value is Yes, for this particular line.

    Thank you
    Laura

    Here is an example of work for you, copy and change the javascript that you need.

    To find names of columns to the select list of apex > address view the source of your page report and use them accordingly in the JS

    http://Apex.Oracle.com/pls/Apex/f?p=46417:11

    Test/test connection

    function test(pThis) {
     //get the curren row index on change
     var currIndex = $('select[name="'+pThis.name+'"]').index($x(pThis.id));
     // check current items value (return value of lov)
     if (pThis.value=='Yes') {
      // if true change the value of column f01 at same row index
      $('select[name="f01"]')[currIndex].value = 'Yes';
     }
     else {
       //do something else
      }
    }
    
    //In the element attributes of update column add
    onchange="javascript:test(this);"
    
  • I need assistance with deactivation Suite CS6.  My Mac Book has been stolen. Can you help me?

    I need assistance with deactivation Suite CS6.  My Mac Book has been stolen. Can you help me?

    Contact support by web chat or telephone to reset the activations.

    Mylenium

  • I'm suddenly needing help with my browser Firefox (6.0.2)

    Hello
    I'm suddenly needing help with my browser Firefox (6.0.2)

    (OS: I use Windows XP).

    When I open the browser, I don't see is a totally white screen of white, with all the toolbars at the top.

    I know that my physical connections are very good: I have tested the modem, turned the pc market etc and I can also receive/send emails.

    This problem started today, September 8, 2011 and has never happened before.

    Is it a coincidence that Firefox itself to day before I disconnected yesterday evening? Could this be something to do with this particular new update?

    I also noticed that just before I "opened" Firefox, I now get a small box indicating:

    [JAVASCRIPT APPLICATION]
    Handl exc in Ev: TypeError: this oRoot.enable is not a function

    This never appeared before - I hope that it offers a clue has what is wrong.

    The browser not be stuck in Mode safe, said by the way.

    Of course, I can't find solutions to the problem on the internet, I don't physically see all Web sites!
    (A friend sends this request in my name from their pc)

    Any light you can throw on this problem of confusion would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.

    If the only option is to uninstall Firefox and reinstall from your site, I'm also in trouble (I can not see the internet or download).
    In this case, would you be able to send the .exe file as an attachment to my e-mail address? In the affirmative, please let me know and I'll give you more details.

    Thanks in advance.

    One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Need help with installing Win7 on Satellite L70-A-12W

    I bought Satellite L70-A-12W with preinstalled victory 8.1 two days ago... I have no recovery of win7, but I have Win7 64 Bit DVD new.
    I would like to install win 7. I follow the instructions concerning the closing down, on Bios (I have version 1.3) safety boot is disabled and the boot mode is MSC mode.

    I did a recovery on USB media if something with is wrong. Earn 8.1 I installed Paragon Partition Manager 14 (free version) and see the Partition Table. It UriPattern like this:
    1 partition - system - 1-GB NTFS (Partition of Service);
    2. partition (no name) - 100 MB - it's the gray color.
    3 partition (local partition) - 128 MB;
    4 partition C: (win 8.1) - Go 920 - NTFS drive.
    5. partition - recovery - 10.1 GB - NTFS (Partition OEM Service).

    I would like to keep evrything what is, if possible, and instead og Win8.1 install Win 7 ultimate 64-bit (which I have). And after than that, resize this partition of 100 GB and make a second partition private for my data - partition D: - for example.

    I did things in the BIOS and win7 DVD and got error massage: Windows cannot be installed to this disk. The selected disk is of the GPT Style partition...

    I found a solution to clean the disc in the BACK, but I'm not sure that I have with this procedure will delete oll data disc. I'll guarantee loos e if I do this... If all other partitions will remain instead of C--> I can always make backup returns with media recovery with win 8.1 and hopes to keep the warranty.

    Now, I don't know what I have to do...

    I would just have win 7 on my laptop with minimal change to the partition table and all the partitions instead of C (where now is win 8.1).

    Could you please help me...

    Hello

    The question is: why you want to keep the present partitions on the HARD disk.
    Using two systems Win 8 and Win 7 on this laptop?

    The fact is that if you want to use only Windows 7, it s not appropriate to keep the old partitions on the HARD disk.

    Secondly, you already have the Toshiba Recovery flash memory stick.
    This recovery media allows you to return to the factory settings.

    This means that recover the laptop using this memory flash USB stick recovery would again create the same partitions and install the Win 8.1 System.

    Finally and above all Windows 7 supports 4 primary partitions as primary partitions are applicable to the tables of partition MBR and partition table MBR allow four primary partitions.

    After you create the primary partition 4th Windows system will accept only the volumes 'Dynamics' (logical drives). You must create an extended partition containing many logical partitions.

    However, if you use a table of GPT partition that is supported by the 64-bit Windows versions, you can configure up to 128 partitions and you need t differ between "primary" and "extended" partitions

    In addition, the GPT partition table also requires the UEFI BIOS.

    More details here:
    http://support.Microsoft.com/kb/2581408

Maybe you are looking for

  • We complete your itunes store request. An unknown error has occurred. (204)

    Whenever I try to download something from the store, I get this error message, "we could complete your request of the itunes store. An unknown error has occurred. (204) there was an error in the iTunes store. Please try again later. » I checked my an

  • Photo Viewer

    This question relates to the photo viewer.  How to make all the thumbnails be actual photos and not the same chosen window pic?

  • Disk defragmentation

    Not able to enable defragmentation, Window Vista.  He kept spinning for 8-9 hours and no result.

  • "Explorer.exe application error"(0xc0000022). "

    I use Windows vista and because of the failure of my computer was improperly arrested and when I tried to it turned on I got this error message explore .exe-application. (0xc0000022), the application doesn't have to initialize correctly. Click ok to

  • Hallo

    I have windows 7 and I'm interested by when I install windows 10, all my data - images, document other years will be deletd or not? I thank.