I need to have to dropdown menus that use if else statements and calculate shipping
<p>I have 2 dropdown menus and a couple of textboxes. The shipping, price, and total are all seperate texboxes. I am new to javascript and dont know how to write the if else statement to do this.</p>

<p>When a change occurs with handtools, call the function calculations().
 When a change occurs with powertools, also call the function
calculations().</p>

<p>Then, in the function calculations, use an if
if handtools has been selected and powertools has been selected,
calculate for both
else
if handtools has not been selected and powertools has been selected,
calculate for powertools
else
if handtools has been selected and powertools has not been selected
calculate for handltools
else
zero out all fields.</p>

<p>This is what I have so far but using this method only 1 dropdown menu works:</p>

<pre><code>    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
&lt;head&gt;
    &lt;title&gt;

    &lt;/title&gt;    
    &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt;
    &lt;meta http-equiv="content-language" content="en-us" /&gt;

 &lt;!-- This is where your link tag goes when linking to an external style sheet. --&gt;

&lt;!--This is the format you will use when entering JavaScript --&gt;    
&lt;script type="text/javascript"&gt;
/* &lt;![CDATA[ */

 window.onload=function() {  
  if (document.getElementById) { 
 document.getElementById("selection").onchange=function() { switchme(this); }  
  } 
 } 
 function switchme(SNewSel) { 
 var ind = SNewSel.selectedIndex; 
 var txt = document.getElementById('TextField1'); 
 var txt2 = document.getElementById('TextField2');
 var txt3 = document.getElementById('TextField3');
 var txt4 = document.getElementById('TextField4');
 switch (ind) { 
  case 1: // hand tool 
  txt.value = "$20"; 
   txt2.value = "$0"; 
    txt3.value = "$5"; 
     txt4.value = "$25"; 
 break; 
  case 2: // hand tool 
  txt.value = "$20"; 
   txt2.value = "$0"; 
    txt3.value = "$5"; 
     txt4.value = "$25"; 
 break; 
  case 3: // hand tool 
  txt.value = "$20"; 
   txt2.value = "$0"; 
    txt3.value = "$5"; 
     txt4.value = "$25"; 
 break; 
  case 3: // hand tool 
  txt.value = "$20"; 
   txt2.value = "$0"; 
    txt3.value = "$5"; 
     txt4.value = "$25"; 
 break; 
   case 4: // hand tool 
  txt.value = "$20"; 
   txt2.value = "$0"; 
    txt3.value = "$5"; 
     txt4.value = "$25"; 
 break; 
   case 5: // hand tool 
  txt.value = "$20"; 
   txt2.value = "$0"; 
    txt3.value = "$5"; 
     txt4.value = "$25"; 
       case 6: // hand tool 
  txt.value = "$20"; 
   txt2.value = "$0"; 
    txt3.value = "$5"; 
     txt4.value = "$25"; 
 break;
  default: 
 txt.value='$20'; 
 } 
} 


/* ]]&gt; */
&lt;/script&gt;    

&lt;/head&gt;

  &lt;body&gt; 


&lt;h1&gt;Purchase Order&lt;/h1&gt;
&lt;form action="FormProcessor.html" name="contact_form" method="get" enctype="application/x-www-form-urlencoded" onsubmit="return confirmSubmit();" onreset="return confirmReset();"&gt;    
&lt;h3&gt;Products&lt;/h3&gt;
&lt;table&gt;
&lt;tr&gt;
  &lt;td&gt;  
&lt;p&gt;Hand Tools &lt;br /&gt;$20.00&lt;/p&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;select name="hand_tool" size="1" id="selection"&gt;
      &lt;option value="1"&gt;Hand Tool&lt;/option&gt;
      &lt;option value="2"&gt;Saw&lt;/option&gt;
      &lt;option value="3"&gt;Hammer&lt;/option&gt;
      &lt;option value="4"&gt;Screwdriver&lt;/option&gt;
      &lt;option value="5"&gt;Wrench&lt;/option&gt;
      &lt;option value="6"&gt;Pliers&lt;/option&gt;
      &lt;/select&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;p&gt;Power Tools &lt;br /&gt;$30.00&lt;/p&gt;
  &lt;/td&gt;
  &lt;td&gt;      
  &lt;select name="power_tool" size="1" id="select"&gt;
      &lt;option value="7"&gt;Power Tool&lt;/option&gt;
      &lt;option value="8"&gt;Circular Saw&lt;/option&gt;
      &lt;option value="9"&gt;Sabre Saw&lt;/option&gt;
      &lt;option value="10"&gt;Drill&lt;/option&gt;
      &lt;option value="11"&gt;Belt Sander&lt;/option&gt;
      &lt;option value="12"&gt;Table Saw&lt;/option&gt;
    &lt;/select&gt;
  &lt;/td&gt; 
&lt;/tr&gt;
&lt;/table&gt;

&lt;h3&gt;Shipping Fees&lt;/h3&gt;
&lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;Item 1: &lt;input id="TextField1" type="text" name="TextField1" value="" /&gt;&lt;/td&gt;
  &lt;td&gt;Item 2: &lt;input id="TextField2" type="text" name="TextField2" value="" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Shipping: &lt;input id="TextField3" type="text" name="shipping" value="" /&gt;&lt;/td&gt;
  &lt;td&gt;Total: &lt;input id="TextField4" type="text" name="total" value="" /&gt;&lt;/td&gt;
  &lt;/tr&gt; 
&lt;/table&gt; 
&lt;h3&gt;Customer Information&lt;/h3&gt;
  &lt;p&gt;First Name
    &lt;input type="text" name="first_name" value="FirstName" onclick="document.forms[0].first_name.value = '';" onchange="confirmSubmit();"/&gt;  
  Last Name
    &lt;input type="text" name="last_name" value="LastName" onclick="document.forms[0].last_name.value = '';" onchange="confirmSubmit();" /&gt;&lt;/p&gt;
  &lt;p&gt;Street Address 1 
    &lt;input type="text" name="address1" value="Address1" onclick="document.forms[0].address1.value = '';" onchange="confirmSubmit();" /&gt;&lt;/p&gt;
  &lt;p&gt;City 
    &lt;input type="text" name="city" value="City" onclick="document.forms[0].city.value = '';" onchange="confirmSubmit();" /&gt;
  State 
    &lt;input type="text" name="state" value="State" onclick="document.forms[0].state.value = '';" onchange="confirmSubmit();" /&gt;
  Zip 
    &lt;input type="text" name="zip" value="Zip" onchange="return checkForNumber(this.value);" onclick="document.forms[0].zip.value = '';" /&gt;&lt;/p&gt;
  &lt;p&gt;Phone
    &lt;input type="text" name="phone" value="Phone" onchange="return checkForNumber(this.value);" onclick="document.forms[0].phone.value = '';" /&gt;
  Fax
    &lt;input type="text" name="fax" value="Fax" onclick="document.forms[0].fax.value = '';" onchange="return checkForNumber(this.value);" /&gt;&lt;/p&gt;

  &lt;p&gt;Payment Method? 
  &lt;input type="radio" name="credit_card" /&gt;Visa

  &lt;input type="radio" name="credit_card" /&gt;MasterCard

  &lt;input type="radio" name="credit_card" /&gt;American Express&lt;/p&gt;
  &lt;p&gt;Credit Card Number&lt;input type="text" name="cardNumber" value="CardNumber" size="50" onclick="document.forms[0].cardNumber.value = '';" onchange="return checkForNumber(this.value);" /&gt;&lt;/p&gt;

&lt;table&gt;
&lt;tr&gt;
  &lt;td&gt;  
&lt;p&gt;Expiration Month&lt;/p&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;select name="month" size="1" style="width: 200px"&gt;
      &lt;option value="months"&gt;Month&lt;/option&gt;
      &lt;option value="january"&gt;January &lt;/option&gt;
      &lt;option value="february"&gt;February&lt;/option&gt;
      &lt;option value="march"&gt;March&lt;/option&gt;
      &lt;option value="april"&gt;April&lt;/option&gt;
      &lt;option value="may"&gt;May&lt;/option&gt;
      &lt;option value="june"&gt;June&lt;/option&gt;
      &lt;option value="july"&gt;July&lt;/option&gt;
      &lt;option value="august"&gt;August&lt;/option&gt;
      &lt;option value="september"&gt;September&lt;/option&gt;
      &lt;option value="october"&gt;October&lt;/option&gt;
      &lt;option value="november"&gt;November&lt;/option&gt;
      &lt;option value="december"&gt;December&lt;/option&gt;
      &lt;/select&gt;
  &lt;/td&gt;
  &lt;td&gt;

  &lt;p&gt;Expiration Year&lt;/p&gt;
  &lt;/td&gt;
  &lt;td&gt;      
  &lt;select name="expiration" size="1"&gt;
      &lt;option value="2009"&gt;2012&lt;/option&gt;
      &lt;option value="2010"&gt;2013&lt;/option&gt;
      &lt;option value="2011"&gt;2014&lt;/option&gt;
      &lt;option value="2012"&gt;2015&lt;/option&gt;
      &lt;option value="2013"&gt;2016&lt;/option&gt;
      &lt;option value="2014"&gt;2017&lt;/option&gt;
    &lt;/select&gt;
  &lt;/td&gt; 
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;input type="image" alt="image of a submit button" src="submitButton.gif" onchange="confirmSubmit()" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;input type="reset" value="Reset Form" src="resetButton.gif" onchange="confirmReset();" /&gt;&lt;/p&gt;    
&lt;/form&gt;    


  &lt;/body&gt;
  &lt;/html&gt;
</code></pre>
