Conditional Statements, student working on finals... help =(

Please help me! I have been working on finals since 8 am just today... it is now almost midnight and I am exhausted! Can someone please help me???
What I'm trying to do is simply click on a button and then have a info box i have created show up. I have the visibilty set to false and then it'll go to true... but, maybe it's the time of the day, but I can't get my conditional to work, I can't find any resources to help me out.... basically what i want is this.
function infoBox1(evt:MouseEvent)
if (myBtn is clicked)
  this.infoBox_mc.visible=true;
myBtn.addEventListener(MouseEvent.CLICK,infoBox1);
it's possible this could all be wrong... but can anyone help me pls?

use:
function infoBox1(evt:MouseEvent)
  this.infoBox_mc.visible=true;
myBtn.addEventListener(MouseEvent.CLICK,infoBox1);

Similar Messages

  • If condition statement not working in jsp scriptlet

    <%
    String hostName = java.net.InetAddress.getLocalHost().getCanonicalHostName();
    if(hostName.endsWith("dinesh.com"))
    System.out.println("it works");
    else {
    System.out.println("it doesn't work");
    %>
    I am getting output as it works & it doesn't work. It seems the If condition is not working. Pls help with this issue.
    Thanks

    Dinesh_Nala wrote:
    Even the condition in if is returning true, the x value i am get as "/user2/"How did you knew that it returns true? Or did you just expect that? Do you trust yourself more than Java? Too bad.
    Just debug it:
    System.out.println("Actual hostname value: [" + hostName + "]");
    System.out.println("Does it end with dinesh.com? " + hostName.endsWith("dinesh.com"));

  • Workflow conditional statement not working

    I have 2 level approvals of objects in Documents list.
    The document first uploaded by user and then first need to get approval from HR Line Manager and then get approval from HR manager.
    the attach image shows shows workflow , the issue is either I select approve or reject in first approval the if statement is always true , it should not go inside if statement if first approval is rejected by HR Line Manager roles
    Tech Learner

    Hi,
    To make the condition work in the workflow, there are two more things need to be done:
    1. Enable content approval in the Documents library which the workflow is associated with.
    Go to the Library Settings page of the Documents library > click Versioning settings > select Yes under Require content approval for submitted items.
    If we do not enable this, the value of Approval Status column will always be Approved.
    2. Add a Set Workflow Variable step above the Start Approval Process step and set it to Yes in the workflow.
    After adding the Set Workflow Variable step, we can set the Approval Status column when we approve or reject the task process. Otherwise the Approval Status column will not change no matter how the task process works.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Need Help W/ Conditional Statement...

    Hi guys,
    I have a project uploaded at:
    http://www.jasonfraziercreativedesign.com/client_sites/kimyarbrough2/
    After everything has loaded into place, and you click on -- say MODELING -- the photos slide away, the separator bars disappear, and the particular (sample) content is loaded in.  This works wonderfully for all the buttons (MODELING, ACTING, MUSIC, SCHEDULE and ABOUT KIM) -- but only when you click on them when the site first loads.
    If you try to click on the buttons again, when you're IN a section -- it will cycle through the animation again.
    I know I need some kind of conditional statement that says if you're ALREADY LOOKING AT A SECTION (i.e. the sourceLoader.source = a section) then don't cycle through the animation again -- just get rid of the current content and display the appropriate new content.
    If you're IN the MODELING SECTION, for instance and you click MODELING again -- I don't want Flash to do ANYTHING (ie NULL).  But if you're in MODELING, and you click on ACTING -- I just want the MODELING stuff to go away and present the ACTING stuff (no animation).
    Here's the pertinent AS that I have currently -- any help about where to place the proper CONDITIONAL (if/else) statement would be so appreciated:
    function swap_photos_place_content(theSection:String):void {
    // ANIMATE THE 4 PANEL PHOTOS LEAVING THE CONTENT AREA
    var photo1Tween:Tween = new Tween(kim_photo1_mc, "y", Regular.easeOut, kim_photo1_mc.y, 620, 2, true);
    var photo2Tween:Tween = new Tween(kim_photo2_mc, "y", Regular.easeOut, kim_photo2_mc.y, -600, 2, true);
    var photo3Tween:Tween = new Tween(kim_photo3_mc, "y", Regular.easeOut, kim_photo3_mc.y, 620, 2, true);
    var photo4Tween:Tween = new Tween(kim_photo4_mc, "y", Regular.easeOut, kim_photo4_mc.y, -600, 2, true);
    // AFTER THE LAST PHOTO HAS MOVED OUT, FADE UP THE CONTENT MASK
    photo4Tween.addEventListener(TweenEvent.MOTION_FINISH, fadeup_content_mask);
         function fadeup_content_mask(event:TweenEvent):void {
         var main_mask_fadeoutTween:Tween = new Tween(main_mask_mc, "alpha", Regular.easeOut, 1, 0, 1, true );
         var content_mask_fadeupTween:Tween = new Tween(content_mask_mc, "alpha", Regular.easeOut, 0, 1, 1, true);
    // AFTER THE CONTENT MASK FADES UP, THE STAGE IS READY TO LOAD IN THE CONTENT
    content_mask_fadeupTween.addEventListener(TweenEvent.MOTION_FINISH, load_in_content);
              function load_in_content(event:TweenEvent):void {
    // BEFORE LOADING IN THE NEW SECTION, TAKE AWAY THE OLD SECTION
    sectionLoader.source=null;
    trace("ready to load in content");
    sectionLoader.source=theSection;
    // ADD LISTENERS FOR THE SECTION-CONTENT CLICKS
    inv_modeling_button.addEventListener(MouseEvent.CLICK, modeling_click);
    function modeling_click(event:MouseEvent):void {
    trace("modeling_click");
    swap_photos_place_content("modeling.swf");
    inv_acting_button.addEventListener(MouseEvent.CLICK, acting_click);
    function acting_click(event:MouseEvent):void {
    trace("acting_click");
    swap_photos_place_content("acting.swf");
    inv_music_button.addEventListener(MouseEvent.CLICK, music_click);
    function music_click(event:MouseEvent):void {
    trace("music_click");
    swap_photos_place_content("music.swf");
    inv_schedule_button.addEventListener(MouseEvent.CLICK, schedule_click);
    function schedule_click(event:MouseEvent):void {
    trace("schedule_click");
    swap_photos_place_content("schedule.swf");
    inv_aboutkim_button.addEventListener(MouseEvent.CLICK, aboutkim_click);
    function aboutkim_click(event:MouseEvent):void {
    trace("aboutkim_click");
    swap_photos_place_content("aboutkim.swf");

    One thing you can do is create a function that removes all the event listeners for all the buttons.  Then when you click a button run that function then add event listeners for all other buttons.

  • Some help for a simple condition statement...

    Hello! I wanted some help this condition statement...
    There are 2 tweens called "mc_sun" and "mc_welcome" I want to
    run when someone clicks on a button called "btn_home", but I don't
    know exactly how to write the code because I've already tried these
    2 modes and noone work at all!
    THANKS FOR THE HELP!!!!

    I think I know what you're after here ... but I could be
    wrong ;) but try this:

  • 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>");
    }

  • 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"
    )

  • Java programming standard for conditional statement

    Hi,
    Is it proper Java standard to use constants first in a conditional statement? I've never seen coding in this way, even when I was in college I never saw it in any of our books.
    example:
    String x = null;
    if (null==x){
    //Do some stuff
    }

    kevjava wrote:
    yawmark wrote:
    ...hence, more work.Not if "NAME_KEY" (i.e., the literal value) changes.
    ~If some wise guy resets it to null, then you've lost all benefit of making a constant out of it to begin withIf that happens, you've got some people problems to deal with! Anyways, if it's really a constant, it'll be final, right?
    .... and I was sort-of reiterating that it was a self-named constant... you're right, of course, but I guess I'm just peaved at having to see stuff like...
    private String JAN="JAN";
    private String FEB="FEB";
    // ...and on and on...
    // later...
    if (FEB.equals(month)) {
    // do stuff
    } else {
    // do stuff
    }Have you ever actually seen code like that in production? I wonder, what are you up to that a class needs its own, private, set of months?
    My point is that the three-letter abbreviation is always going to be "FEB" (yes, i18N and language specializations aside)Why put them aside, though? They're not exactly corner cases

  • Conditional statements

    Hello all,
    I recently have been attempting to make conditional statements work in adobe acrobat X.  Here is what I have in the custom calculation script text box:
    var a = this.getField("endResult2").value;
    if(a >= 120000) event.value = (a / 150000) * 100;
    else event.value = 0;
    This has worked for me however, I want to replace the values 120000 and 150000 with variables/fields (i.e. "minimum2" or "meet2").  Unfortunately, every time I replace the values with fields the calculation no longer works.  Any help would be greatly appreciated.
    Additionally, when the calculation is executed and a number is given the connecting equations downstream do not execute unless another field is edited.  Any input on this would also be very helpful.
    Thank you!!

    Thank you for the help!
    Also, there were no 0s present in the fields. I believe I just had to switch the action to run as javascript?
    Here is the new script:
    var b = this.getField("endResult1").value;
    var q = this.getField("minimum1").value;
    var w = this.getField("meet1").value;
    if(b >= q) event.value = (b / w) * 100;
    else event.value = 0;

  • Advanced Conditional Action does work when I add second condition

    I am using CP 8. I can't figure out why I'm running into this problem. I have a series of If-Then conditional actions, but I'm running into problems. I've narrowed it down to this one problem.
    This is a simple check mark box that should either show the check mark or not.
    As long as I only have one condition, it works fine. As soon as I add the second condition, it stops working.
    Any suggestions? I appreciate the help!

    I have 6 statements. Some are true and some are false. I'm trying to communicate that the more false statements they assume, the bigger their problem. The size of the problem is represented by my "Hope" variable. This is used to show / hide a meter with 6 levels.
    Checkbox - 1. False Statement - Decrement Hope if they check
    Checkbox - 2. False Statement - Decrement Hope if they check
    Checkbox - 3. True Statement - Increment Hope if they check
    Checkbox - 4. False Statement - Decrement Hope if they check
    Checkbox - 5. True Statement - Increment Hope if they check
    Checkbox - 6. False Statement - Decrement Hope if they check
    My head started to spin when I thought about all the possibilities, so I was going to write an advanced action for each statement.
    Since my meter has 6 levels, I numbered them 5-10. Above, I show the one that is they are 10 or higher, then show all the meter levels. I thought I could add the additional condition that if the checkbox is 0 or 1, then, I'd either do the opposite of the score: decrement or increment. So, each checkbox would have 12 conditional statements:
    Statement One (False Statement) would be:
    Check Box, Hope = 10. Decrement. Show 4 Meters.
    Check Box, Hope = 9. Decrement. Show 3 Meters.
    etc.
    Uncheck Box, Hope = 10. Increment. Show 5 Meters.
    Uncheck Box, Hope = 9. Increment. Show 4 Meters.
    etc.
    It seems like that is causing problems in my sequencing for me. Which ever one I put first, it's going to go to the next one.
    Is this clear? I'm happy to send you the file if that helps.
    Thanks for the help!

  • Parsing/evaluating conditional statements

    I need some help developing an algorithm for parsing and evaluating conditional statements. I need to be able to handle variables, logical operators, relational operators, mathematical operators, and parentheses.
    For example:
    if ( (a+1 > b*5) and ((c +2) * 6 <= 5) )
    All the variables correspond to a number so the expression could be trivially converted to something like this:
    if ( (8+1 > 4*5) and ((6 +2) * 6 <= 5) )
    I am aware that infix expression can be converted to postfix expressions for easier evaluation, but I don't know exactly how this is done, nor do I know if this would be the best way to do it.
    If more information is needed let me know.
    Thanks in advance,
    Paul

    Thanks, this is very helpful information. I ended up coding it by converting to postfix already and have had good results, but I will look into the tree method when I get some time and see if it works better for me. Also if you know what method would typically yeild the best performace for evaluation of the expressions, let me know.
    Also, for anyone else that might want to do this I coded a simple stack class to get around creating objects for evaluating integer/boolean expressions, as long as its not a problem if exceptions are not thrown if the expression's logic is messed up.
    Thanks again,
    Paul
    public class IntStack
        private int[] stack;
        private int top;
        public IntStack(int maxSize)
            stack = new int[maxSize];
            top = 0;
        public void push(int value)
            top++;
            stack[top] = value;
        public int popInt()
            top--;
            return stack[top+1];
        public void push(boolean value)
            top++;
            if (value)
                stack[top] = 1;
            else
                stack[top] = 0;
        public boolean popBool()
            top--;
            return stack[top+1] == 1;
        public boolean isEmpty()
            return top == 0;
    }

  • Apple Mini DVI to Video Adapter is not working. Please Help...

    I bought an Apple Mini DVI to Video Adapter to connect my Macbook to a TV using normal video cable. When I connect the cable, my Laptop DIsplay gives a flickr once and then it shows nothing. I checked Display in the system preference where I don't get a secondary monitor option. My TV is panasonic and it's an old one. I work on Final Cut Pro and it's very very important to see my videos on a TV. What am I doing wrong with the connection? Anyone Please Please help...

    Your probably not doing anything wrong. There are thousands of users with Similar issues and it seems to be with many different adapters.
    We have Mini DP to VGA (3 different brands) and they all fail most of the time. This seems more prevalent with LCD Projectors. I've tested some (50+) with VGA Monitor (HP) and they all worked, LCD Projector (Epson, Hitachi, and Sanyo) and they all fail, DLP Projector (Sanyo) and one worked.
    My Apple Mini DP to DVi works most of the time. My Mini DP to HDMI (Generic non Apple) works every time.
    The general consensus is that Apple broke something in the OS around 10.6.4 or 10.6.5 and its not yet fixed. As we are a school we have logged a case with the EDU Support group so will see what happens.
    Dicko

  • IF and ABS condition statement in BEX query designer

    Hi,
    I would like to ask the best way for me to produce an acceptable result from Excel IF and ABS Condition statement.
    The condition statement that I have on my Excel file is
    =IF((A2-B2)>0,ABS(A2-B2),0)
    I'm trying multiple times to reproduce this in BEX Query designer, unfortunately I'm getting a bad result or unacceptable formula.
    Anyone who could help me with my issue?
    Thanks,
    Arnold

    Hi Arnold,
    Thank you,
    Nanda

  • I have purchased Production Premium CS4 Educational Version. Its serial number is not working. Please help...

    I have purchased Production Premium CS4 Educational Version. Its serial number is not working. Please help...

    If you recently purchased this then it is not likely to be a valid sale/purchase.  Adobe does not sell older versions of their products and no one but Adobe provides student/teacher licensing.  If you purchased this some time years ago and it is only recently that you find you are not able to reactivate it with the original serial number you can try contacting Adobe Support thru chat and see if they will be willing to work with you to resolve this.
    For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

Maybe you are looking for