Using Type Input in Conditional Statement

If the user types "ball" in the input textfield, instance
name: name_txt, I want to move to the next frame and stop. Can
somebody tell me, what I am doing wrong here? Thank you!
submit_btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
if(name_txt.text == "ball")
gotoAndStop(2);
--Jamesabth, thnx for your last reply!

for some reason, it is not waiting for me to type in "ball"
into the input text field, instance name: name_txt, and just going
to frame 2.
submit_btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
if(name_txt.text.toLowerCase() == "ball")
nextFrame();
thnx for helping me.

Similar Messages

  • Trying to retrieve content from a text field & use it in a conditional statement

    Hi Everyone,
    I have a form with a text field and a button. The  text field is called "orderNo", and the button is called "genOrder".
    Initially  the text field is empty, and clicking on the button fills the text  field with an appropriate order number.
    I need to check the text  field for data (content) before writing the order number to it, this  way if an order number is already present in the text field it will not  be over written.
    My intention is to use an if / else structure to  perform the testing, however I don't know how to retrieve the content  of the text field (if content is present!).
    If anybody can  suggest how I can go about retrieving the content of the text field and  then use it in an if / else statement it will be greatly appreciated.
    Kind  Regards,
    Davo

    Hi try67,
    Thanks for your assistance. I have posted in this http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=70276#p70276 forum asking for further assistance if your able to help more.
    Once again thanks for your time.
    Cheers
    Davo

  • Using LIKE in a conditional statement

    I'm trying to color code a column if another column is LIKE "1-%" but there isn't a like option. How is this accomplished?

    there is a workaround for this.
    say you have 2 column
    A---------------------B
    1-A----------------ABC
    1-C----------------bcd
    2-E----------------xyz
    create a dummy column which will have only first two characters of column A for ex
    A---------------------B--------------C
    1-A----------------ABC-----------1-
    1-C----------------bcd------------1-
    2-E----------------xyz-------------2-
    now implement the conditional formatting using this dummy column and hide this in your report. you wil get wat you need.

  • OMP_SET_NUM_THREADS in a conditional statement?

    I am having problems using OMP_SET_NUM_THREADS in a conditional statement. For example a code like following will make the program to hang indefinitely after starting to execute a parallel DO loop:
    if(mybool.eq.0) then
    call OMP_SET_NUM_THREADS(iprocessors)
    else
    call OMP_SET_NUM_THREADS(1)
    endif
    Is there a problem using this function in conditional statements?
    I am using Forte Studio 7 under Solaris 8 and 10 (I know that it is old but for the moment this is what I have to use...).
    Thanks,
    Rak

    This is probably a bug in Forte 7.
    Can you isolate the problem in a small test case and post the code here. We'll try it on the latest compiler and see if it works or not.
    You know you can download Sun Studio 12 and run it on Solaris 10. (SS 12 is not supported on Solaris 8)

  • Text Entry Box--Advanced Actions--Conditional Statement--Double quotes in literal input value

    Hello forums,
    I'm new to the forums (and Captivate in general), but I'm having a real problem carrying out a tutorial design and I think you may be my only hope.  Let me explain what I want to do and the difficulty that I'm having:
    I'm an instruction librarian at a university, and I'm designing an interactive tutorial for English 100 students to complete in order to become familiar with how to search the library catalog.  What I've done is taken a screenshot of the catalog search page, made it the background of a slide in Captivate (vers. 6), and placed a text entry box over the search bar in the screenshot.  The idea is for the students to conduct a simulated search by choosing one of three suggested search string formulations, and depending on the search string they enter, the tutorial will jump to a slide featuring a screenshot of what the actual search results would look like.  The idea is to emphasize the use of keywords over full-sentence phrases, and the use of double quotation marks to enclose multi-word search terms.
    So I've set the action for the TEB to "Execute Advanced Actions" and then created some IF/THEN statements in the "Advanced Actions" pop-up window (with action type set to 'conditional'). The script is such that if the student enters the first search option (how does sleep affect college students) in the TEB, the tutorial jumps to 1 slide, if they enter the second option (college students AND sleep), featuring a Boolean operator (AND), the tutorial jumps to a 2nd slide, and if they enter the third option ("college students" AND sleep) with the double quotes around "college students" and the Boolean operator, the tutorial should jump to a 3rd slide.  This action script works fine for the first two input options, but I can't make it work for the third search option.
    I think that it has something to do with the fact that the third input option features double quote marks, and this seems to throw off the script (I tried a quote-less input value for the third IF/THEN just to make sure that it would work jumping to the 3rd slide and it did), and I'm wondering if anyone has any suggestions as to how I can get around this issue.  Again, I need it to work so that if the student enters "college students" AND sleep, with the quote marks and the Boolean operator, the tutorial will jump to a slide showing the search results if those search terms were used in a real search of the catalog.
    I'd be extremely grateful for any help that anyone here can give me, we've been trying to make our online tutorials more engaging and interactive (and therefore more interesting), and I think this would be a great way to teach students about using quotes in their catalog searches.
    Thank you for your time and consideration.
    Andrew Wilk
    College Library
    UW-Madison

    The tutorial is for a "how to use catalog searching" instruction in an undergraduate library session.  We use boolean operators (AND, OR, NOT) to combine search terms, ex. to search for books about the sleeping habits of college students, I would enter "college students AND sleep."  Because "college students" is a multi-word phrase to describe one concept, I need to put quotation marks around the phrase to prevent the catalog from searching for the individual words separately, so the most correct search becomes ["college students" AND sleep] with quotation marks around only "college students," a user-typed "AND," and the word "sleep" (no q-marks).
    A colleague of mine worked out a pretty cool (if complicated) solution that I'll share if anyone is interested.  Since the q-marks where the problem, we've set it up so that the TEB validates the response for the search string with q-marks around "college students." If they enter it correctly, the tutorial jumps to the corresponding slide. The attempt # is set to 1, and if the user fails to enter the validated phrase (they misspell or use one of the other response options) then the TEB is set to run an Advanced Actions Script in which the other two options are scripted in IF/THEN statements that cause, when the term is entered correctly, the tutorial to jump to their corresponding slides. We've created another tab of IF/THEN statements that say that if the response is NOT equal to one of these response options, then the slide restarts (technically the slide "jumps" back to itself and starts over) and the user gets another chance to start the cycle over again.
    I know this is confusing (I had a really hard time explaining it in words), so if anyone is interested I could make a Jing video when I have some time.
    Thank you for all your suggestions

  • How to use Oracle Table Type values in Select Statement.

    Hi,
    I am fetching initial set of values into Oracle Table of Records Type and want to use list of values in the Select statement.
    For example, try something like the following:
    TYPE t_record IS RECORD (
    ID TABLEA.ID%type,
    NO TABLEA.NO%type,
    v_record t_record;
    TYPE t_table IS TABLE OF v_record%TYPE;
    v_table t_table;
    -- Code to populate the values in v_table here.
    SELEC ID,NO, BULK COLLECT INTO <some other table variabes here> FROM TABLEA
    WHERE ID IN v_table(i).ID;
    I want to know how to use the values from Oracle Table Type in the Select Statement.

    Something like this:
    create or replace type t_record as  object (
    id number,
    no number
    CREATE or replace type t_table AS TABLE OF t_record;
    set serveroutput on
    declare
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    begin
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /Untested!
    P;
    Edited by: bluefrog on Mar 5, 2010 5:08 PM

  • Using conditional statements stored inside a variable

    I'm trying to store the body of different emails inside of my
    database to use in email sent with cfmail. The content of the
    emails has conditional statements using cfif and other variables
    based on a query running. If I set the content as a variable and
    then place that inside of the cfmail tag it does not process the
    cold fusion code. Is there a way that I can process this code so
    that the final output is what is placed within the cfmail tag or is
    it not possible to do what I'm trying to accomplish? Thanks in
    advance for any ideas.

    Here is a sample taken from the text file. The output created
    by the cfsavecontent tag is identical to the text file.
    Dear <cfif IsDefined(GetData.strFirstName) AND
    GetData.strFirstName IS NOT
    "">#GetData.strFirstName#<cfelse>Member</cfif>,
    Thank you for joining xxxxxxxxx. We're glad to
    have you as a member and appreciate your support. Your
    membership
    application has been processed and your member packet will
    arrive soon.
    Your new membership number is #GetData.strCustomerID#. This
    number is useful
    when buying product from our online store, renewing your
    membership or
    contacting us with questions or comments.
    <cfif GetData.ExpirationDate IS "9999-12-1">We are
    especially grateful for your commitment to xxxxxxxx
    through your Life Membership.<cfelse>Your membership is
    current through #DateFormat(GetData.ExpirationDate, "MMMM
    YYYY")#.</cfif>

  • Using CONSTANT in Condition Statement

    Hi
    What I am trying to do is put CONSTANT into IN Condition Statement.
    When I use Bind variables just like :bind, It works properly
    But What if I use as a CONTANT, It doesn't work.
    In my opinion, parenthesis is not work well.
    Please help me out
    thanks in advance and below is PL/SQL CODE
    PROCEDURE PROC_MAIN
    iUserID          IN     VARCHAR2,
    iJobID IN VARCHAR2
    ) AS
    C_AGENT CONSTANT VARCHAR(20) := '10,11';
    C_staff CONSTANT VARCHAR(20) := '40';
    C_newStaff CONSTANT VARCHAR(20) := '50';
    C_ETC CONSTANT VARCHAR(20) := '20,30';
    BEGIN
    vJobId :=
    CASE iJobID
    WHEN '41' THEN C_AGENT
    WHEN '42' THEN C_staff
    WHEN '43' THEN C_newStaff
    WHEN '40' THEN C_ETC
    END;
    insert into tbl_monthly
    (emp_no, salary)
    select emp_no, salary from tbl_emp
    where Staff_cat in vJobId ;
    end;
    Message was edited by:
    allbory

    Hi,
    Please check the changes:
    Note: table_name is changed to test.
    CREATE OR REPLACE PROCEDURE PROC_MAIN
    iUserID IN VARCHAR2,
    iJobID IN VARCHAR2
    ) AS
    C_AGENT CONSTANT VARCHAR(20) := '10,11';
    C_staff CONSTANT VARCHAR(20) := '40';
    C_newStaff CONSTANT VARCHAR(20) := '50';
    C_ETC CONSTANT VARCHAR(20) := '20,30';
    vJobId          VARCHAR2(20);BEGIN
    vJobId :=
    CASE iJobID
    WHEN '41' THEN C_AGENT
    WHEN '42' THEN C_staff
    WHEN '43' THEN C_newStaff
    WHEN '40' THEN C_ETC
    END;
    EXECUTE IMMEDIATE 'INSERT INTO tbl_monthly(empno, salary) SELECT empno, sal FROM scott.emp WHERE deptno IN ('||vJobId||')' ;
    END;

  • How to use Conditional statements in SQL Loader control file

    Hi,
    I am using sql loader to load a flat file to the table. I am using control file for this purpose as show below:
    LOAD
    INTO TABLE store_shrink
    TRUNCATE
    FIELDS TERMINATED BY "     "
    TRAILING NULLCOLS
    SITE_ID char,
    ST_SHRINK char,
    ST_REVENUE char,
    SHRINK_PR char ":ST_SHRINK/:ST_REVENUE"
    My question is this. If in the flat file the value of 'ST_REVENUE' is '0', then I want 'SHRINK_PR' to be '0' as well, and skip the calculation (:st_shrink/:st_revenue).
    How to achieve this with the conditional statement or using any Oracle function?
    Any help or suggestion is greatly appreciated.
    Thanks in advance.

    Hi there,
    I tried the following in my above query and it doesn't work somehow. Anyone has an idea? I have been on internet throughout but to no avail. Please help:
    LOAD
    INTO TABLE store_shrink
    TRUNCATE
    FIELDS TERMINATED BY "     "
    TRAILING NULLCOLS
    SITE_ID char,
    ST_SHRINK char,
    ST_REVENUE char,
    SHRINK_PR char "case (when :st_revenue<>'0.00' then :SHRINK_PR=:ST_SHRINK/:ST_REVENUE else :SHRINK_PR='0.00') end"
    )

  • IScript problem - Cannot use an input in a sql statement

    I get the input from an input box and it is correct
    &param = %Request.GetParameter("Dept");
    I try to use it in a sql statement lke this and nothing displays even though it its entered correctly and the value exists in the table
    Local SQL &usersCursor = CreateSQL("SELECT EMPLID, BIRTHDATE, NAME FROM PS_EMPLOYEES WHERE DEPTNAME_ABBRV = '&param'");
    If I leave out the single quotes around and do it like this &param then it errors out
    Local SQL &usersCursor = CreateSQL("SELECT EMPLID, BIRTHDATE, NAME FROM PS_EMPLOYEES WHERE DEPTNAME_ABBRV = &param");
    I need help structuring this correctly
    Thanks,
    Allen Cunningham

    Hi,
    CreateSQL does not execute the sql statement, it just creates an SQL object, which you have to execute.
    Something like this:
    &param = %Request.GetParameter("Dept");
    Local SQL &usersCursor = CreateSQL("SELECT EMPLID, BIRTHDATE, NAME FROM PS_EMPLOYEES WHERE DEPTNAME_ABBRV = :1", &param);
    While usersCursor.Fetch(&Emplid, &Birthdate, &Name)
    /* do processing*/
    End-While;

  • Restrict the input in condition type

    Hello Friends,
    In my PO there are six condition types used for freight calculation my requirement is when user enter value in any condition type thn all the remaining 5 condition types should not allow any entry(it should become grey).
    pls let me knw how we can achieve this?
    Sunny

    Hi
    Try using the Condition Exclusion Groups
    SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Condition Exclusion
    If several condition records are valid in the price determination process, you must define rules stipulating which conditions are selected and which are disregarded. To do this, use the condition exclusion mechanism.
    The exclusion of condition records is controlled via exclusion groups. An exclusion group is a list of condition types that are compared with each other during the price determination process. The result may be the exclusion of a whole group of conditions or the exclusion of individual conditions within a group.
    The result of the price determination process can thus be influenced with regard to a desired criterion (for example, the lowest price) by the exclusion of certain condition types, whereas others are taken into account in this process.
    Example
    You can define a condition exclusion process that determines the most favorable price and excludes less favorable but fundamentally possible pricing results. The lowest price then overrides the condition type priorities that would have been dictated by the access sequence.
    In the calculation schema you define the procedure by which selection within or between the condition exclusion groups takes place. The following possibilities are available:
    Selection of the most favorable condition type within a condition exclusion group.
    Selection of the most favorable condition record of a condition type if more valid condition records exist (for example, selection from different condition records of condition type PR00)
    Selection of the most favorable of two condition exclusion groups (in this case, all condition types of the two groups are cumulated and the totals compared with each other)
    The tables for the exclusion of conditions are supplied empty. You must therefore work through the following points if you wish to use the condition exclusion facility:
    Define condition exclusion groups
    Assign condition types to condition exclusion groups
    Enter condition exclusion groups in the calculation schema and define a procedure for the determination of the condition types to be excluded.
    Activities
    1. Create a condition exclusion group by entering an alphanumeric key that is max. four characters long, together with a description.
    2. Assign the condition types to a condition exclusion group. A condition exclusion group can contain any number of condition types.
    3. Enter the condition exclusion group in the calculation schema that you will be using for price (or cost) determination purposes.
    4. In the process, note the sequence (consecutive numbers) in which the exclusion groups are to be processed.
    Using this yuou can achive your requiremnt .
    Thanks & Regards
    Kishore

  • Which Access sequence will use for sales tax condition type for TAXINN

    hi.,
    which Access sequence will use for sales tax condition type for TAXINN procedure.pls give one example (Access sequence) and give fields.
    Because i couldnot create the condition record,the system not accepted for tax indicator.
    Regards.,
    lakshmanan

    We also got the same problem with our client and escalated it to SAP.
    they advised to use the access sequence <b>JIND</b> which consists of condition tables in the order given below
    <b><u><i>Step    Condn Table</i></u> 
    10            354
    20            355
    30            40</b>
    Attach this to your condition types.
    Rewards if it helps.
    Regards,
    Anbu

  • Conditional statement in html

    This is actually not a JSP question but an HTML question. I could'nt find any good html forum sites out there, and since I received excellent replies in my previous post, I am hoping that those of you who know JSP also know html. Heres my question, is there any conditional statement in html (I don't want to use scripts)? The only conditional statement I found was the logic:equal (not equal) statement. And it seems to only work for forms. I am using JSP in conjunction with html so I used an inner html variable declaration in my JSP function. This variable will be used by my html code. And I would like to check the value of that variable in html.
    Heres my JSP function containing the inner html declaration:
    function showItemEdit(field)
    var elements = editWindowDiv.document.all;
    elements("editWindowField").value = "";
    fieldhtml.innerHTML = field;
    var retVal = null;
    retVal = window.showModalDialog("javascript:document.write(window.dialogArguments.innerHTML);editWindowInit();",editWindowDiv,
    "dialogWidth:335px;dialogHeight:185px;scroll:no;status:no;unadorned:no");
    if (retVal == "OK")
    alert("OK");
    else
    alert("Cancel");
    The inner html variable, fieldhtml.innerHTML, is the value I would like to check in my html code.
    This is what I woul like to accomplish in my html code:
    if fieldhtml == register then
    <tr>
    <td class="bodymd">  <bean:message key="label.register"/>:</td>
    <td><input type="text" name="editWindowField" value="" maxlength="5"></td>
    </tr>
    else
    <tr>
    <td class="bodymd">  <bean:message key="label.shift_no"/>:</td>
    <td><input type="text" name="editWindowField" value="" maxlength="3"></td>
    </tr>
    end if
    I am not sure how to accomplish if-else statements in html. I would appreciate any help. Thanks!

    You are mixing things a bit. There is no JSP in your example. You cannot do conditional statements in HTML. However, you can use JavaScript to output HTML:
    if(someCondition){
    document.write("<yourHTMLTags>whatever</yourHTMLTags>");
    else{
    document.write("<yourHTMLTags>something else</yourHTMLTags>");
    }

  • Text box not empty conditional statement

    I've been asked to develop a survey and, in several places, a
    score is given for the completion of text box. However, if there is
    no text in the box, then a score of zero should be given.
    I thought the best way to do this would be to use a hidden
    field with a conditional statement saying "if text box is not empty
    then score=4, else score=0.
    However, firstly I'm not sure how to write this and secondly,
    how do you check if a text box is empty?
    I think it really calls for some human input but the client
    is quite sure this is how he wants it.
    The scores are all going to be inserted into a mysql database
    and sorted out there, so there may be some fudge available there
    but if php could do something nice in the code, that would be
    preferable.
    Thanks in advance.
    Andrew

    Drewbles wrote:
    > However, firstly I'm not sure how to write this and
    secondly, how do you check
    > if a text box is empty?
    Believe it or not, with the PHP function called empty();
    http://docs.php.net/manual/en/function.empty.php
    if (empty($_POST['fieldName'])) {
    // give a score of 0
    } else {
    // give a positive score
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to use i for if condition in a for i in loop?

    Hi friends,
    I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
    cursor is
    select c1,c2,c3 from table1; -- 100 rows returned.
    open cursor
    loop
    fetch c1,c2,c3 into v1,v2,v3;
    for i in 1..3 loop
    if 'v'||i between 90 and 100 then
    v_grade := 'Excellent';
    elsif 'v'||i between 80 and 89 then
    elsif 'v'||i between 50 and 59 then
    end if;
    end loop;
    close cursor;
    This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
    But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
    Thanks for any advice in advance!

    user508774 wrote:
    Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
    So do not underestimate what can be done in SQL.
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
    SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
    The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
    These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
    Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
    Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
    Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
    The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
    Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
    To create a SQL program with parameters is done by using bind variables. Instead of
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    The following SQL source code should be created:
    v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
    The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
    The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
    In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
    UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
    Where v1 and the others are PL/SQL variables.
    That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
    The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features.

Maybe you are looking for