How to compare the value of two combo

I have two Combo Box (cbFirst & cbSecond). I want to compare the value that has been selected by the user and according to the result, the output is displayed. In the two combo box, I have provided the value.

Here is my code:

var a: number;
var b:Number;

function First(evt:Event):void {}
a = evt.target.value;
trace (a);
}
cbFirst.addEventListener (Event.CHANGE, first);

function Second(evt:Event):void {}
b = evt.target.value;
trace (b);
}
cbSecond.addEventListener (Event.CHANGE, second);

If (a > b) {}

trace ("more")

on the other

trace (b is higher);

Trace the statement inside the functions work very well and the value correct a & b is printed. But the comparison in the if statement does not seem to work. Could you please help me.

There is a typing error.  Fix it or delete it:

var a: number;
var b:Number;

function First(evt:Event):void {}
a = evt.target.value;

trace (a);
compareF();
}
cbFirst.addEventListener (Event.CHANGE, first);

function Second(evt:Event):void {}
b = evt.target.value;
trace (b);

compareF()
}
cbSecond.addEventListener (Event.CHANGE, second);

function compareF() {}

If (a > b) {}

trace ("more")

on the other

trace (b is higher);

}

Tags: Adobe Animate

Similar Questions

  • How to compare the content of two Wordpad / documents notebook without reading them line by line?

    How to compare the content of two Wordpad / documents notebook without reading them line by line?

    Hello

    Without this feature is included in the operating system.

    However, you can use your favorite search engine to look for software that needs to perform these tasks.

    WARNING of THIRD PARTY SOFTWARE: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope this information helps.

  • How to compare the content of two files so I can delete duplicate records

    I'm trying to clean up several subfolders with duplicates without looking at the details of each record.  Is it possible in Windows XP to compare the content of two files whether they are an exact replica.

    Hi rav42010,

    Follow the steps in the article.

    Description of the tool in Windows XP disk cleanup

    http://support.Microsoft.com/kb/310312

    You can also use third-party app to perform the task using your favorite search engine.

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • Help to submit Input tag - how to wrap the value on two lines for BB Pearl (8100)

    Hello

    I have a question about the packaging of the value of a tag input submit on a page I have.

    I have an input tag:

    
    

    On the BB Bold/Storm is very good but I find on the Blackberry 8100 in the button text appears as a 'Yes. Dangerous goods have... ».

    Is there a way to encapsulate the text? I tried the class CSS white-space: normal but that has not worked. I also tried to add in
    (new line) and an assortment of different ways without success.

    Users want is the full text for legal purposes.

    If it is not possible, what would be the best option in addition to shorten the text (which is my last option)?

    Thanks in advance for your help.

    Kind regards

    Andrew Low

    You can also change your user interface so that both boxes option for the user to choose Yes or no, and then have a submit with generic text button that is perhaps not as long.

  • How to get the values of two points separated in Javascript checkbox

    Hello

    I want to get the values of an element of the checkbox as a form of separted from the colon as what we get in the database. For example '10:11:12 '.

    When I tried to write a code like this it does not work. Please tell me where I'm wrong.


    function getValues (pcheckbox) {}
    cb_name = html_GetElement(pcheckbox+'_0').name;
    cb_array = document.getElementByName (cb_name);
    var val_str =': ';
    for (i = 0; i < cb_array.length; i ++)
    {
    If (cb_arraychecked)
    {
    val_str += cb_array [i] .value + ':';
    }
    }
    html_GetElement (P206_TEXT) .value = val_str;
    }



    I try to call the function getValues ('P206_CHECK');

    Thank you and best regards,
    Vikas Krishna

    Hi Vikas,

    Try this-

    (1) create a checkbox element called PI_CHK
    (2) in the Option of the attributes of the form element, type onclick = "getValues () '"
    (3) create a named text field point PI_TEXT

    Enter the HTML of the Page Header Section

    
    

    Concerning

    Paul

  • How to compare the value of a link with a 'HOLD' string variable...?

    Hi all

    I have two tables - TABLE1 and TABLE2, and the tables are having the STATUS column. The requirement is as if the STATE of TABLE1 column is updated as 'HOLD', then the same value must be updated the column STATUS of TABLE2.


    create or replace trigger "TEST_TRG".
    FRONT
    update of 'STATUS' on 'Table1 '.
    for each line
    Start
    if(:New.) STATUS = 'HOLD') then
    {
    insert into TABLE2 (STATUS)
    value (: new.) STATUS);

    }
    end if;
    end;


    COMPILE ERROR:
    Compilation failure, line 3 (02: 40:14) line numbers associated with compilation errors are relative to the first BEGIN statement. This affects only the compilation of database triggers.
    PLS-00103: encountered the symbol "{" when waiting for one of the following numbers: (begin case declare exit for goto rise back loop mod null pragma select update while < ID > < a between double quote delimited identifiers of > < a variable binding > < < continue the current closing delete fetch locking insert opening rollback to savepoint sql set run commit forall fusion pipe purge "{" symbol has been ignored.) Compilation failure, line 7 (02: 40:14) line numbers associated with compilation errors are relative to the first BEGIN statement. This affects only the compilation of database triggers.
    PLS-00103: encountered the symbol "}" when expecting one of the following values: (begin case declare end elsif else goto exit rise back loop mod null pragma select update while < ID > < a between double quote delimited identifiers of > < a variable binding > < < continue the current closing delete fetch locking insert opening rollback to savepoint sql set run commit forall fusion pipe purge the symbol "} ' was ignored.)




    I get the errors as above when the trigger is compiled. Can someone please help me fix it.


    Thank you and best regards,
    Suhas








    CREATE OR REPLACE TRIGGER "TEST_TRG"
       BEFORE UPDATE OF "STATUS"
       ON "TABLE1"
       FOR EACH ROW
    BEGIN
       IF (:NEW.status = 'HOLD')
       THEN
          INSERT INTO table2
                      (status
                      )
               VALUES (:NEW.status
                      );
       END IF;
    END;
    

    You should learn how to write PL/SQL code.

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

  • How to use the value in a combo box as a parameter "with these values?

    Hello, new user.

    I have a box of drop-down list on Page 1, on which the user can choose a number of study. The list box is named "P1_STUDY_NBR".

    Then I have a list, a single entry that goes to my form master / detail, which is Page 6. I would like him to go the number of study that the user choose on Page 1.

    In my goal on the list to create/edit entry, I put in the 'Page of this Application"," Page 6 ", then in any of these items, I put in."
    P6_STUDY_NBR

    My question is what to use with these values, where I want the content of the P1_STUDY_NBR. I tried:
    & P1_STUDY_NBR

    and it does not work. If I put in one of the numbers in the study, as 336-00, then it works, but I want to increase the number of study that the user chooses in the drop-down list. What should I do for P1_STUDY_NBR content?

    -Mary

    Hello

    The format should be:

    &P1_STUDY_NBR.
    

    You seem to miss the point at the end

    Andy

  • How to compare the value of the line with header element element? in RTF


    Hello


    My question is not correct but see details below


    I have an XML file like this


    & lt; PO_HD & gt;


    & lt; PO_NUMBER & gt; 3456 & lt; / PO_NUMBER & gt;


    & lt; PO_LINES & gt;


    & lt; LINES_ROW & gt;


    & lt; PO_LINE_ID & gt; 1234 & lt; / PO_LINE_ID & gt;


    & lt; / LINES_ROW & gt;


    & lt; LINES_ROW & gt;


    & lt; PO_LINE_ID & gt; 6789 & lt; / PO_LINE_ID & gt;


    & lt; / LINES_ROW & gt;


    & lt; LINES_ROW & gt;


    & lt; PO_LINE_ID & gt; 5678 & lt; / PO_LINE_ID & gt;


    & lt; / LINES_ROW & gt;


    & lt; / PO_LINES & gt;


    & lt; PO_LINE_ATTCH & gt;


    & lt; TEXT & gt; This text is for ID 1234 & lt; / TEXT & gt;


    & lt; ID & gt; 1234 & lt; / ID & gt;


    & lt; TEXT & gt; This text is for ID 5678 & lt; / TEXT & gt;


    & lt; ID & gt; 5678 & lt; / ID & gt;


    & lt; / PO_LINE_ATTCH & gt;


    & lt; / PO_HD & gt;



    I created the RTF template like this



    & lt;? for each: PO_HD? & gt;


    & lt; name of xsl: variable = "var1" select = "(PO_HD/PO_LINE_ATTCH)" / & gt;


    & lt;? for each: LINES_ROW? & gt;


    & lt; name of xsl: variable = "first_rec" xdofo:ctx = 'incontext' select = 'position ()' / & gt;


    This is row in. ID: & lt;? PO_LINE_ID? & gt;


    & lt;? [$first_rec] TEXT / $var1? & gt;


    & lt;? end foreach? & gt;


    & lt;? end foreach? & gt;



    The output shows like this



    It comes in. line ID: 1234


    This text is for ID 1234



    {color: #ff0000} This is row in. ID: 6789 {color}


    {color: #ff0000} This text is for ID 5678 {color}



    This is row in. ID: 5678



    It is false (see the text id line and the line isn't even)



    What I want is



    It comes in. line ID: 1234


    This text is for ID 1234



    This is row in. ID: 6789



    This is row in. ID: 5678


    This text is for ID 5678



    Is this possible? Kindly help me



    Thank you


    Rahul

    "< name of xsl: variable ="var1"= sΘlectionner ' PO_HD/PO_LINE_ATTCH / *" / > "

    <? for-each: LINES_ROW? >

    This is line in. ID: <? PO_LINE_ID? >
    < name of xsl: variable = 'ID' xdofo:ctx = 'incontext' select = "PO_LINE_ID" / >

    <?-foreach: $var1? >
    < name of xsl: variable = "pos" xdofo:ctx = 'incontext' select = "position () - 1" / >
    <? If: () = $ID text? > <? \[$pos\ $var1]? > <? end if? >
    <? end foreach? >

    <? end foreach? >

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

  • Compare the content of two equal nested tables

    I'm working on a black box test where I compare the contents of two structurally equal tables before and after executing a script of some. My two tables, MDQ_OLD and MDQ_NEW, are filled with the data in two separate operations.

    The two tables, I'll compare are nested, as you can see in the CREATE TABLE scripts below.

    I tried to use the less-operator sign, but without success.

    I also tried to select data in a type that is % ROWTYPE to my nested tables, but it does not work as well (see the below script in this post).

    Can you please help me on this problem on how to compare the content of two nested tables?

    Run the scripts below to reproduce the problem and be sure to update this post if more information is required.

    -The scripts below-

    Select * from version of v$.

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    PL/SQL Release 11.2.0.4.0 - Production

    CORE Production 11.2.0.4.0

    AMT for Linux: Version 11.2.0.4.0 - Production

    NLSRTL Version 11.2.0.4.0 - Production

    -First of all, I create my types

    CREATE OR REPLACE TYPE FORCE AS OBJECT MDQ_DETAIL (NUMBER OF MDQ_DETAIL_ID, MDQ_DETAIL_DESC VARCHAR2 (100));

    CREATE OR REPLACE TYPE T_MDQ_DETAIL AS TABLE MDQ_DETAIL;

    -Note that this type contains the table T_MDQ_DETAIL type:

    CREATE OR REPLACE TYPE MDQ_PARENT FORCE AS OBJECT (NUMBER MDQ_ID, MDQ_DETAILS T_MDQ_DETAIL);

    - Then I create two equal nested tables

    CREATE THE NESTED TABLE AS MDQ_PR_OLD STORE MDQ_DETAILS MDQ_PARENT MDQ_OLD TABLE.

    CREATE THE NESTED TABLE AS MDQ_PR_NEW STORE MDQ_DETAILS MDQ_PARENT MDQ_NEW TABLE.

    -Insert test data in the nested tables

    Insert into MDQ_OLD (MDQ_ID, MDQ_DETAILS) Values (1, T_MDQ_DETAIL (MDQ_DETAIL(1,'desc1')));

    Insert into MDQ_NEW (MDQ_ID, MDQ_DETAILS) Values (2, T_MDQ_DETAIL (MDQ_DETAIL(1,'desc1')));

    -Try to use the negative operator to compare the contents of the trailer of the nested tables, but it gives this error:

    -ORA-00932: inconsistent data types: expected - got DISPATCH. T_MDQ_DETAIL

    Select * from MDQ_NEW

    less

    Select * from MDQ_OLD;

    -Try to select in a ROWTYPE, but it fails

    declare

    myTypeOld MDQ_OLD % ROWTYPE;

    myTypeNew MDQ_New % ROWTYPE;

    myTypeDiff MDQ_New % ROWTYPE;

    Start

    -Select gives: PLS-00497: do not mix between row and several rows (in BULK) list

    Select * bulk collect into mdq_old myTypeOld;

    Select * bulk collect into mdq_new myTypeNew;

    -Need a 'compare the function of membership card' on the types of multiset except to work, but as far as I

    -I'm not able to bulk collect into myTypeOld or myTypeNew, this won't help out me.

    myTypeDiff: = multiset myTypeOld except myTypeNew.

    end;

    -Cleaning:

    drop table MDQ_OLD;

    drop table MDQ_NEW;

    type of projection MDQ_PARENT;

    type of projection T_MDQ_DETAIL;

    type of projection MDQ_DETAIL;

    > queries you provided intercepts not who.

    You asked how to compare the content of nested tables.

    I knew that you didn't ask for what you actually want, that's why I asked you to specify the comparison more in detail.

    > Do you have a query that grabs this difference as well?

    SELECT o.mdq_id, od.*
    OF mdq_old o, TABLE (o.mdq_details) od
    LESS
    SELECT n.mdq_id, nd.*
    OF mdq_new n, TABLE (n.mdq_details) nd;

    > Also, if possible, do you have a sample of a statement to COLLECT LOOSE, please?

    Actually, you raise an interesting point on using % ROWTYPE, in my view, that should be. This make...

    DECLARE
    TYPE rt_mdq_new () IS RENDERING
    mdq_id NUMBER,
    mdq_details t_mdq_detail);
         
    TYPE tt_mdq_new IS TABLE OF THE rt_mdq_new;
      
    t_mdq_new tt_mdq_new;
    BEGIN
    SELECT mdq_id, mdq_details
    LOOSE COLLECTION t_mdq_new
    OF mdq_new min.;
    END;
    /

    DECLARE
    CURSOR c_mdq_new
    IS
    SELECT mn.*
    OF mdq_new min.;
         
    TYPE tt_mdq_new IS TABLE OF c_mdq_new % ROWTYPE;
      
    t_mdq_new tt_mdq_new;
    BEGIN
    OPEN c_mdq_new.
    Get the c_mdq_new COLLECT in BULK IN t_mdq_new;
    CLOSE C_mdq_new;
    END;
    /

  • How to read the value of list boxes by iteration in a loop For?

    I have a lot of list boxes on the front of my VI. I want to know how to read the value of this combo with a loop boxes For. The point is that I don't know how to get the reference of each combo box in a loop.

    Any information would be welcome. Thank you!

    su27 wrote:

    I have a lot of combo boxes on the front of my VI [...]

    Be sure to close the references that you have finished with them.

  • How to compare the new values with the old values in triggers.

    Dear all,

    Please tell me how to compare the new values with the old values in triggers.

    Hi, the employee example is in the document. You'd better read yourself.

    CREATE OR REPLACE TRIGGER Print_salary_changes
      BEFORE DELETE OR INSERT OR UPDATE ON Emp_tab
      FOR EACH ROW
    WHEN (new.Empno > 0)
    DECLARE
        sal_diff number;
    BEGIN
        sal_diff  := :new.sal  - :old.sal;
        dbms_output.put('Old salary: ' || :old.sal);
        dbms_output.put('  New salary: ' || :new.sal);
        dbms_output.put_line('  Difference ' || sal_diff);
    END;
    /
    
  • How can I compare the value of column within the COUNT() function?

    I want to compare the value of the column within the COUNT() function as below how ever it gives me the error. I want to calculate the percentage, how can I do this task?
    Thank you.


    SELECT department_id
    , COUNTY (salary < 250000) / COUNT (*)
    OF plch_employees
    GROUP BY department_id
    ORDER BY department_id;
    SELECT  department_id.
            COUNT(CASE WHEN salary < 250000 THEN 1 END) / COUNT(*)
      FROM  plch_employees
      GROUP BY department_id
      ORDER BY department_id
    /
    

    SY.

  • How to compare, present value: block.text_item with the value of data

    Hello
    Could you please tell me
    How to compare the current value: block.text_item with the corresponding database column value.
    I use form 10g

    It has block and there is a text element in this block.
    When I run the form and query the block (in a table), the: block.text_item show me any value it in the database.
    Now I add value in the: block.text_item to the existing value.

    now
    the: block.text_item contains the old + new added value
    While
    the database table contains the value 'old '.

    Now, with a click of button, I want to know what value I added

    Please can you me, is it possible without writing a select query?

    Hello

    Now, with a click of button, I want to know what value I added

    So you're saying always user will bring added value to the existing value. Because it will fail in a case. Let's say that
    Database value is = ABCD
    The user opens the form and he took the D and write E and now value is ABCE and length is always the same 4. There is therefore no need to add.

    In any case, you can know that the value of database at run time, there is a property for the element called DATABASE_VALUE. She gives the value that is in the database while you run the form before save. and you can use it like that...

    Trigger = WHEN-MOUSE-DOUBLE-CLICK on item level
    DECLARE
      vItemValue DATATYPE; -- Set the data type according to your desired field.
      vValueAdded DATATYPE; -- Set the data type according to your desired field.
    BEGIN
      vItemValue:=GET_ITEM_PROPERTY('ITEM_NAME',DATABASE_VALUE);  -- It will return you the database value in vItemValue variable.
      IF LENGTH(vItemValue)>LENGTH(:FORM_ITEM_NAME) THEN  -- It mean something change or added
        vValueAdded:=SUBSTR(:FORM_ITEM_NAME,LENGTH(vItemValue)+1);
        MESSAGE('Added value is : '||vValueAdded);  -- It will show you the added value.
      END IF;
      -- now suppose you want to show the old and new value in message not the added one
      -- Then no need of IF condition. You can just use message like this
      -- And i would prefer to use like this way
      MESSAGE('Old Value : '||vItemValue||'  New Value - '||:FORM_ITEM_NAME);
      MESSAGE('Old Value : '||vItemValue||'  New Value - '||:FORM_ITEM_NAME);
    END;
    

    Hope that's clear.

    -Clément

  • Comparison of the values of two consecutive lines.

    Hello.
    I can compare the value of the same field in two consecutive rows?

    If this is the case. How could I do?

    Thanks in advance

    Hello

    Check [function Lag Lead | http://www.oracle-base.com/articles/misc/LagLeadAnalyticFunctions.php].

    Twinkle

Maybe you are looking for

  • Windows Explorer

    When I want to enter a Windows Explorer application restarts automatically.  I can't get into my control panel, my computer, etc..  What is missing or what is the problem?

  • Unable to delete the file or folder, XP falsely claims it is used

    Quite often when you try to delete a file or folder, I get the response "cannot delete [file or folder name]: it is used by another person or program."  Close all programs that might be using the file and try again. » "No one else" uses the file and

  • Original hardrive replacement for one ssd

    I have a laptop of HP Envy J153CL 17. What upgrade of the disk ssd should I use to replace the rather pedestrian original? 1 TB is installed. The operating system is Windows 8.1. Thanks, Harvey

  • HP 4620 does not print except test hp page

    and print doc said that everything is fine, much ink, acts like it is printing but page is blank.  This happens with print, copy or receive a fax thank you

  • driver Win 8.1 LaserJet 1102

    HP has the intention to provide a windows 8.1 for the 1102 printer driver w?  It works perfectly fine with Win 7.  I don't want to replace a printer to work because I replaced a computer