How do I pass a form name into a if else if else loop?
<pre><code>function ship_stuff()
{

ship_me = document.getElementById("shipMethod").value;
alert(ship_me);
if("ship_me" == "priority2" )
{
    document.getElementById("shippingChg").value = 3.20;
}

else if(ship_me == "priority3")
{
    document.getElementById("shippingChg").value = 4.30 ;
}
else if(ship_me == "priority4")
{
    document.getElementById("shippingChg").value = 5.40 ;
}

else if(ship_me == "overnight")
{
    document.getElementById("shippingChg").value = 15.75 ;
}

else if(ship_me == "UPS")
{
    document.getElementById("shippingChg").value = 15.00 ;
}

else  (ship_me == "free")
{
    document.getElementById("shippingChg").value = 0.00 ;
}
</code></pre>

<p>The HTML portion of the code:</p>

<pre><code>&lt;tr&gt;
        &lt;th colspan="4" class="label"&gt;Shipping Method:
          &lt;select name="shipMethod" id="shipMethod" size="1"&gt;
            &lt;option value=""&gt;Choose a shipping method&lt;/option&gt;
            &lt;option value="priority2"&gt;Priority mail $3.20 (4 items or less)&lt;/option&gt;
            &lt;option value="priority3"&gt;Priority mail $4.30 (6 items or less)&lt;/option&gt;
            &lt;option value="priority4"&gt;Priority mail $5.40 (8 items or less)&lt;/option&gt;
            &lt;option value="overnight"&gt;Express $15.75 (4 items or less only)&lt;/option&gt;
            &lt;option value="UPS"&gt;UPS - 2 day $15.00 (9 - 49 items)&lt;/option&gt;
            &lt;option value="free"&gt;Free shipping (50+ items only)&lt;/option&gt;
          &lt;/select&gt;
        &lt;/th&gt;
        &lt;td&gt;&lt;input name="shippingChg" id="shippingChg" type="text" size="10" maxlength="60" value="" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
</code></pre>

<p>My javascript loop is failing when I try and compare my variable to a string. It wont put the option value in to compare as a string. Any ideas how I can fix this? </p>

<p>Thanks for the help!</p>
