If Statement Help, Urgently Need Help!!!!!

Discussion in 'JavaScript' started by slowbob, Nov 1, 2010.

  1. #1
    I'm developing a JavaScript program that uses an if statement to determine the tax payable income with a sliding tax scale for example:
    the client enters their weekly Income.

    function AnnualSalary() {
    A = document.form1.txtws.value
    B =(parseInt(A ) * 52)

    if ( B<= 6000) {alert(" Annual tax 0") }

    else if(6001<=B<=80000 {alert("")}

    My Problem is in this next part I want to be able to say c=0.30*b in the else if statement and then display the result in an alert.

    Am i able to do this, or is there a better way of going about this then what am doing?

    I'm very new to javascript so its all still very confusing to me.
     
    slowbob, Nov 1, 2010 IP
  2. S1M

    S1M Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You're doing fine -
    } else {
    c=0.30*b;
    alert (c);
    }
     
    S1M, Nov 2, 2010 IP